Package org.jboss.as.test.http.util
Class TestHttpClientUtils
java.lang.Object
org.jboss.as.test.http.util.TestHttpClientUtils
Utility class with http/https utilities. Not to be confused with Apache
HttpClientUtils.- Version:
- August 2015
- Author:
- Dominik Pospisil <dpospisi@redhat.com>, Peter Skopek, Stuart Douglas, Radoslav Husar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.http.impl.client.CloseableHttpClientgetHttpsClient(org.apache.http.client.CredentialsProvider credentialsProvider) static SSLContextstatic org.apache.http.impl.client.CloseableHttpClientCreates a http client that sends cookies to every domain, not just the originating domain.static org.apache.http.impl.client.HttpClientBuilderSame aspromiscuousCookieHttpClient()but instead returns a builder that can be further configured.
-
Constructor Details
-
TestHttpClientUtils
public TestHttpClientUtils()
-
-
Method Details
-
getHttpsClient
public static org.apache.http.impl.client.CloseableHttpClient getHttpsClient(org.apache.http.client.CredentialsProvider credentialsProvider) - Parameters:
credentialsProvider- optional cred provider- Returns:
- client that doesn't verify https connections
-
getSslContext
-
promiscuousCookieHttpClient
public static org.apache.http.impl.client.CloseableHttpClient promiscuousCookieHttpClient()Creates a http client that sends cookies to every domain, not just the originating domain. As we don't actually have a load balancer for the clustering tests, we use this instead.- Returns:
CloseableHttpClientthat gives free cookies to everybody- See Also:
-
promiscuousCookieHttpClientBuilder
public static org.apache.http.impl.client.HttpClientBuilder promiscuousCookieHttpClientBuilder()Same aspromiscuousCookieHttpClient()but instead returns a builder that can be further configured.- Returns:
HttpClientBuilderof the http client that gives free cookies to everybody- See Also:
-