internal PrivateConnection(IServerSettings settings, Func <HttpClientHandler> handlerFactory, ILogger logger) { this.settings = settings; this.logger = logger; handler = handlerFactory(); httpClient = new HttpClient(handler); messageHook = DefaultMessageHook; clientHook = DefaultClientHook; handlerHook = DefaultHandlerHook; responseHook = DefaultResponseHook; }
internal PrivateConnection(ServerSettings settings, Func <CookieContainer> cookieFactory) { this.settings = settings; handler = new HttpClientHandler { CookieContainer = cookieFactory() }; httpClient = new HttpClient(handler); messageHook = DefaultMessageHook; clientHook = DefaultClientHook; handlerHook = DefaultHandlerHook; responseHook = DefaultResponseHook; }
public PrivateConnection AppendHook(HttpReponseHook hook) { responseHook += hook; return(this); }