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); }
public ImgurApi() { this.http = Networking.CreateHttpClient(Networking.CreateHttpClientHandler()); this.http.Timeout = Networking.UploadImageTimeout; }