public ProxyResponseRenderer(ProxySettings proxySettings, KeyStoreSettings trustStoreSettings, boolean preserveHostHeader, String hostHeaderValue, GlobalSettingsHolder globalSettingsHolder) { this.globalSettingsHolder = globalSettingsHolder; client = HttpClientFactory.createClient(1000, 5 * MINUTES, proxySettings, trustStoreSettings); this.preserveHostHeader = preserveHostHeader; this.hostHeaderValue = hostHeaderValue; }
builder.setSslcontext(buildSSLContextWithTrustStore(trustStoreSettings)); } else { builder.setSslcontext(buildAllowAnythingSSLContext());
public static HttpUriRequest getHttpRequestFor(ResponseDefinition response) { final RequestMethod method = response.getOriginalRequest().getMethod(); final String url = response.getProxyUrl(); return HttpClientFactory.getHttpRequestFor(method, url); }
public static CloseableHttpClient createClient(ProxySettings proxySettings) { return createClient(DEFAULT_MAX_CONNECTIONS, DEFAULT_TIMEOUT, proxySettings, NO_STORE); }
public static CloseableHttpClient createClient(int maxConnections, int timeoutMilliseconds) { return createClient(maxConnections, timeoutMilliseconds, NO_PROXY, NO_STORE); }
public static CloseableHttpClient createClient(int timeoutMilliseconds) { return createClient(DEFAULT_MAX_CONNECTIONS, timeoutMilliseconds); }
public static CloseableHttpClient createClient() { return createClient(DEFAULT_TIMEOUT); }
public HttpAdminClient(String scheme, String host, int port, String urlPathPrefix, String hostHeader, String proxyHost, int proxyPort, ClientAuthenticator authenticator) { this.scheme = scheme; this.host = host; this.port = port; this.urlPathPrefix = urlPathPrefix; this.hostHeader = hostHeader; this.authenticator = authenticator; adminRoutes = AdminRoutes.defaults(); httpClient = HttpClientFactory.createClient(createProxySettings(proxyHost, proxyPort)); }