public class HttpClient4 extends java.lang.Object implements HttpClient
Modifier and Type | Class and Description |
---|---|
private static class |
HttpClient4.SingleClient
A pool that simply shares a single HttpClient.
|
Modifier and Type | Field and Description |
---|---|
private HttpClientPool |
clientPool |
private static HttpClientPool |
SHARED_CLIENT |
CONNECT_TIMEOUT, DELETE, FOLLOW_REDIRECTS, GET, POST, PUT, READ_TIMEOUT
Constructor and Description |
---|
HttpClient4() |
HttpClient4(HttpClientPool clientPool) |
Modifier and Type | Method and Description |
---|---|
HttpResponseMessage |
execute(HttpMessage request,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Send an HTTP request and return the response.
|
private final HttpClientPool clientPool
private static final HttpClientPool SHARED_CLIENT
public HttpClient4()
public HttpClient4(HttpClientPool clientPool)
public HttpResponseMessage execute(HttpMessage request, java.util.Map<java.lang.String,java.lang.Object> parameters) throws java.io.IOException
HttpClient
execute
in interface HttpClient
parameters
- HTTP client parameters, as a map from parameter name to value.
Parameter names are defined as constants below.java.io.IOException