Exemple #1
0
        private static void OnWebProxyChanged(EventArgs e)
        {
            var newClient = Networking.CreateHttpClient(Networking.CreateHttpClientHandler());
            var oldClient = Interlocked.Exchange(ref globalHttpClient, newClient);

            oldClient.Dispose();

            WebProxyChanged?.Invoke(null, e);
        }
Exemple #2
0
 public ImgurApi()
 {
     this.http         = Networking.CreateHttpClient(Networking.CreateHttpClientHandler());
     this.http.Timeout = Networking.UploadImageTimeout;
 }