client.setCookieStore(new HttpCookieStore.Empty());
/** * @param cookieStore The cookie store * @deprecated Use {@link HttpClient#setCookieStore(CookieStore)} on the HttpClient instance passed * to {@link #WebSocketClient(HttpClient)} */ @Deprecated public void setCookieStore(CookieStore cookieStore) { this.httpClient.setCookieStore(cookieStore); }
private void configureHttpClient(HttpClient httpClient) { // Redirects must be proxied as is, not followed httpClient.setFollowRedirects(false); // Must not store cookies, otherwise cookies of different clients will mix httpClient.setCookieStore(new HttpCookieStore.Empty()); }
private static HttpClient httpClient() throws Exception { if (_httpClient == null ) { _httpClient = new HttpClient(new SslContextFactory()); _httpClient.setConnectTimeout(TIMEOUT_CONNECT); _httpClient.setFollowRedirects(false); _httpClient.setCookieStore(new HttpCookieStore.Empty()); _httpClient.start(); _ourClient = true; } return _httpClient; }
private HttpClient createClient() throws Exception { int selectors = Math.max(1, Runtime.getRuntime().availableProcessors() / 2); HttpClient client = new HttpClient(new HttpClientTransportOverHTTP(selectors), new SslContextFactory(true)); client.setFollowRedirects(false); client.setCookieStore(new HttpCookieStore.Empty()); client.setMaxConnectionsPerDestination(256); client.setAddressResolutionTimeout(15000); client.setConnectTimeout(15000); client.setIdleTimeout(idleTimeout); client.setUserAgentField(null); client.start(); client.getContentDecoderFactories().clear(); return client; }
client.setCookieStore(new HttpCookieStore.Empty());
client.setCookieStore(new HttpCookieStore.Empty());
private HttpClient client() { HttpField agent = new HttpField("User-Agent", config.agent); HttpClient httpClient = new HttpClient(); httpClient.setFollowRedirects(false); httpClient.setMaxConnectionsPerDestination(MAX_CONNECTIONS_PER_DEST); httpClient.setMaxRequestsQueuedPerDestination(MAX_QUEUED_REQUESTS_PER_DEST); httpClient.setUserAgentField(agent); httpClient.setCookieStore(new HttpCookieStore.Empty()); return httpClient; }
private HttpClient client() { HttpField agent = new HttpField("User-Agent", config.agent); // TODO: non-keepalived client connections HttpClient httpClient = new HttpClient(); httpClient.setFollowRedirects(false); httpClient.setMaxConnectionsPerDestination(MAX_CONNECTIONS_PER_DEST); httpClient.setMaxRequestsQueuedPerDestination(MAX_QUEUED_REQUESTS_PER_DEST); httpClient.setUserAgentField(agent); httpClient.setCookieStore(new HttpCookieStore.Empty()); return httpClient; }
client.setCookieStore(new HttpCookieStore.Empty());
public HttpClient createClientForHttp2() { ExecutorService executor = executorFactory.getExecutorService("jetty-http2-client", configFactory.getIntProperty(CONSUMER_HTTP2_CLIENT_THREAD_POOL_SIZE), configFactory.getBooleanProperty(CONSUMER_HTTP2_CLIENT_THREAD_POOL_MONITORING)); HTTP2Client h2Client = new HTTP2Client(); h2Client.setExecutor(executor); HttpClientTransportOverHTTP2 transport = new HttpClientTransportOverHTTP2(h2Client); HttpClient client = new HttpClient(transport, createSslContextFactory()); client.setMaxRequestsQueuedPerDestination(configFactory.getIntProperty(CONSUMER_INFLIGHT_SIZE)); client.setCookieStore(new HttpCookieStore.Empty()); return client; }
public HttpClient createClientForHttp1(String name) { ExecutorService executor = executorFactory.getExecutorService(name, configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_SIZE), configFactory.getBooleanProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_MONITORING)); HttpClient client = new HttpClient(createSslContextFactory()); client.setMaxConnectionsPerDestination(configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_MAX_CONNECTIONS_PER_DESTINATION)); client.setMaxRequestsQueuedPerDestination(configFactory.getIntProperty(CONSUMER_INFLIGHT_SIZE)); client.setExecutor(executor); client.setCookieStore(new HttpCookieStore.Empty()); return client; }
public HttpClient createClientForHttp2() { ExecutorService executor = executorFactory.getExecutorService("jetty-http2-client", configFactory.getIntProperty(CONSUMER_HTTP2_CLIENT_THREAD_POOL_SIZE), configFactory.getBooleanProperty(CONSUMER_HTTP2_CLIENT_THREAD_POOL_MONITORING)); HTTP2Client h2Client = new HTTP2Client(); h2Client.setExecutor(executor); HttpClientTransportOverHTTP2 transport = new HttpClientTransportOverHTTP2(h2Client); HttpClient client = new HttpClient(transport, createSslContextFactory()); client.setMaxRequestsQueuedPerDestination(configFactory.getIntProperty(CONSUMER_INFLIGHT_SIZE)); client.setCookieStore(new HttpCookieStore.Empty()); return client; }
public HttpClient createClientForHttp1(String name) { ExecutorService executor = executorFactory.getExecutorService(name, configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_SIZE), configFactory.getBooleanProperty(CONSUMER_HTTP_CLIENT_THREAD_POOL_MONITORING)); HttpClient client = new HttpClient(createSslContextFactory()); client.setMaxConnectionsPerDestination(configFactory.getIntProperty(CONSUMER_HTTP_CLIENT_MAX_CONNECTIONS_PER_DESTINATION)); client.setMaxRequestsQueuedPerDestination(configFactory.getIntProperty(CONSUMER_INFLIGHT_SIZE)); client.setExecutor(executor); client.setCookieStore(new HttpCookieStore.Empty()); return client; }
this.httpClient.setConnectTimeout(options.connectionTimeoutMillis); this.httpClient.setMaxConnectionsPerDestination(options.maxConnectionsPerDestination); this.httpClient.setCookieStore(new HttpCookieStore.Empty()); if(options.proxyHost != null) { ProxyConfiguration proxyConfig = httpClient.getProxyConfiguration();
client_ = new WebSocketClient(); client_.getHttpClient().setCookieStore(new WebSocketCookieStore(webClient));
@BeforeClass public static void setupEnvironment() throws Exception { wireMockServer = new WireMockServer(ENDPOINT_PORT); wireMockServer.start(); client = new HttpClient(); client.setCookieStore(new HttpCookieStore.Empty()); client.setConnectTimeout(1000); client.setIdleTimeout(1000); client.start(); }
httpClient.setCookieStore(new HttpCookieStore.Empty());
httpClient.setCookieStore(new HttpCookieStore.Empty());