public final class StatefulHttpClientService extends HttpClientService
HttpClientContext,
that is requests are executed with the same resources such as
CookieStore. It's applicable
for the Login-then-request scenario.HttpClientServiceHttpClientService.RequestCustomizer| Constructor and Description |
|---|
StatefulHttpClientService(org.apache.http.impl.client.CloseableHttpClient httpClient) |
StatefulHttpClientService(org.apache.http.impl.client.CloseableHttpClient httpClient,
org.apache.http.client.protocol.HttpClientContext cxt) |
StatefulHttpClientService(org.apache.http.impl.client.CloseableHttpClient httpClient,
org.apache.http.client.protocol.HttpClientContext cxt,
HttpClientService.RequestCustomizer customizer) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.http.client.methods.CloseableHttpResponse |
execute(org.apache.http.client.methods.HttpUriRequest request) |
String |
request(org.apache.http.client.methods.HttpUriRequest req,
String defaultCharset)
Send request and reads the response content
|
dispose, execute, requestpublic StatefulHttpClientService(org.apache.http.impl.client.CloseableHttpClient httpClient)
public StatefulHttpClientService(org.apache.http.impl.client.CloseableHttpClient httpClient,
org.apache.http.client.protocol.HttpClientContext cxt)
public StatefulHttpClientService(org.apache.http.impl.client.CloseableHttpClient httpClient,
org.apache.http.client.protocol.HttpClientContext cxt,
HttpClientService.RequestCustomizer customizer)
public String request(org.apache.http.client.methods.HttpUriRequest req, String defaultCharset)
req - public org.apache.http.client.methods.CloseableHttpResponse execute(org.apache.http.client.methods.HttpUriRequest request)
throws IOException
IOExceptionCopyright © 2016. All rights reserved.