X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=OpenTween%2FMyCommon.cs;h=c5bf3527adc4dca79ab22fdf8c32f4c0152d0646;hb=69fc5238afbb7eb25dae246f9d8f9754af0a383e;hp=cb0adc1a04c845044be274b4f52af579ac32d17e;hpb=e78340a97f54a7a5123f6d690eaede2237658dea;p=opentween%2Fopen-tween.git diff --git a/OpenTween/MyCommon.cs b/OpenTween/MyCommon.cs index cb0adc1a..c5bf3527 100644 --- a/OpenTween/MyCommon.cs +++ b/OpenTween/MyCommon.cs @@ -976,41 +976,6 @@ namespace OpenTween } /// - /// OpenTween 内で共通して使う設定を施した HttpClient インスタンスを作成します - /// - public static HttpClient CreateHttpClient() - { - return CreateHttpClient(new HttpClientHandler()); - } - - /// - /// OpenTween 内で共通して使う設定を施した HttpClient インスタンスを作成します - /// - public static HttpClient CreateHttpClient(HttpClientHandler handler) - { - switch (HttpConnection.proxyKind) - { - case HttpConnection.ProxyType.None: - handler.UseProxy = false; - break; - case HttpConnection.ProxyType.Specified: - handler.UseProxy = true; - handler.Proxy = HttpConnection.proxy; - break; - case HttpConnection.ProxyType.IE: - default: - handler.UseProxy = true; - handler.Proxy = WebRequest.GetSystemWebProxy(); - break; - } - - var client = new HttpClient(handler); - client.DefaultRequestHeaders.Add("User-Agent", MyCommon.GetUserAgentString()); - - return client; - } - - /// /// 指定された IDictionary を元にクエリ文字列を生成します /// /// 生成するクエリの key-value コレクション