コード例 #1
0
 private HttpMessageHandler EnsureHttpMessageHandler(HttpMessageHandler hmh = null)
 {
     if (_httpMessageHandler == null)
     {
         if (hmh == null)
         {
             hmh = Settings.HttpClientFactory.CreateMessageHandler();
         }
         _httpMessageHandler = hmh;
         _parent?.EnsureHttpMessageHandler(hmh);
     }
     return(_httpMessageHandler);
 }
コード例 #2
0
ファイル: FlurlClient.cs プロジェクト: t13ka/Flurl
 private HttpMessageHandler EnsureHttpMessageHandler(HttpMessageHandler handler = null)
 {
     if (_httpMessageHandler == null)
     {
         if (handler == null)
         {
             handler = (HttpTest.Current == null) ?
                       Settings.HttpClientFactory.CreateMessageHandler() :
                       new FakeHttpMessageHandler();
         }
         _httpMessageHandler = handler;
         _parent?.EnsureHttpMessageHandler(handler);
     }
     return(_httpMessageHandler);
 }