public class ApacheHttpClientDelegate extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ApacheHttpClientDelegate.BodyAndStatusResponseHandler |
static class |
ApacheHttpClientDelegate.BodyResponseHandler |
static class |
ApacheHttpClientDelegate.HttpBodyAndStatus |
static class |
ApacheHttpClientDelegate.StatusCodeResponseHandler |
| Constructor and Description |
|---|
ApacheHttpClientDelegate(ClientBuilder clientBuilder,
boolean pooled) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.http.impl.client.CloseableHttpClient |
createBasicClient() |
int |
delete(String url,
int... statusCodes) |
<T> T |
delete(String url,
org.apache.http.client.ResponseHandler<T> responseHandler,
int... statusCodes) |
String |
get(String url,
int... statusCodes) |
<T> T |
get(String url,
org.apache.http.client.ResponseHandler<T> responseHandler,
int... statusCodes) |
org.apache.http.impl.client.CloseableHttpClient |
getHttpClient() |
int |
post(String url,
int... statusCodes) |
<T> T |
post(String url,
Object body,
Map<String,String> headers,
org.apache.http.client.ResponseHandler<T> responseHandler,
int... statusCodes) |
<T> T |
post(String url,
Object body,
org.apache.http.client.ResponseHandler<T> responseHandler,
int... statusCodes) |
int |
put(String url,
Object body,
int... statusCodes) |
public ApacheHttpClientDelegate(ClientBuilder clientBuilder, boolean pooled) throws IOException
IOExceptionpublic org.apache.http.impl.client.CloseableHttpClient createBasicClient()
public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
public void close()
throws IOException
IOExceptionpublic int delete(String url, int... statusCodes) throws IOException
IOExceptionpublic <T> T delete(String url, org.apache.http.client.ResponseHandler<T> responseHandler, int... statusCodes) throws IOException
IOExceptionpublic String get(String url, int... statusCodes) throws IOException
IOExceptionpublic <T> T get(String url, org.apache.http.client.ResponseHandler<T> responseHandler, int... statusCodes) throws IOException
IOExceptionpublic <T> T post(String url, Object body, Map<String,String> headers, org.apache.http.client.ResponseHandler<T> responseHandler, int... statusCodes) throws IOException
IOExceptionpublic <T> T post(String url, Object body, org.apache.http.client.ResponseHandler<T> responseHandler, int... statusCodes) throws IOException
IOExceptionpublic int post(String url, int... statusCodes) throws IOException
IOExceptionpublic int put(String url, Object body, int... statusCodes) throws IOException
IOExceptionCopyright © 2019. All rights reserved.