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
IOException
public org.apache.http.impl.client.CloseableHttpClient createBasicClient()
public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
public void close() throws IOException
IOException
public int delete(String url, int... statusCodes) throws IOException
IOException
public <T> T delete(String url, org.apache.http.client.ResponseHandler<T> responseHandler, int... statusCodes) throws IOException
IOException
public String get(String url, int... statusCodes) throws IOException
IOException
public <T> T get(String url, org.apache.http.client.ResponseHandler<T> responseHandler, int... statusCodes) throws IOException
IOException
public <T> T post(String url, Object body, Map<String,String> headers, org.apache.http.client.ResponseHandler<T> responseHandler, int... statusCodes) throws IOException
IOException
public <T> T post(String url, Object body, org.apache.http.client.ResponseHandler<T> responseHandler, int... statusCodes) throws IOException
IOException
public int post(String url, int... statusCodes) throws IOException
IOException
public int put(String url, Object body, int... statusCodes) throws IOException
IOException
Copyright © 2019. All rights reserved.