private HttpMessageHandler EnsureHttpMessageHandler(HttpMessageHandler hmh = null) { if (_httpMessageHandler == null) { if (hmh == null) { hmh = Settings.HttpClientFactory.CreateMessageHandler(); } _httpMessageHandler = hmh; _parent?.EnsureHttpMessageHandler(hmh); } return(_httpMessageHandler); }
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); }