public interface HttpClient
Modifier and Type | Method and Description |
---|---|
HttpResponse |
execute(ClassicHttpRequest request)
Executes HTTP request using the default context.
|
<T> T |
execute(ClassicHttpRequest request,
HttpClientResponseHandler<? extends T> responseHandler)
Executes HTTP request using the default context and processes the
response using the given response handler.
|
HttpResponse |
execute(ClassicHttpRequest request,
HttpContext context)
Executes HTTP request using the given context.
|
<T> T |
execute(ClassicHttpRequest request,
HttpContext context,
HttpClientResponseHandler<? extends T> responseHandler)
Executes HTTP request using the given context and processes the
response using the given response handler.
|
ClassicHttpResponse |
execute(HttpHost target,
ClassicHttpRequest request)
Executes HTTP request using the default context.
|
<T> T |
execute(HttpHost target,
ClassicHttpRequest request,
HttpClientResponseHandler<? extends T> responseHandler)
Executes HTTP request to the target using the default context and
processes the response using the given response handler.
|
HttpResponse |
execute(HttpHost target,
ClassicHttpRequest request,
HttpContext context)
Executes HTTP request using the given context.
|
<T> T |
execute(HttpHost target,
ClassicHttpRequest request,
HttpContext context,
HttpClientResponseHandler<? extends T> responseHandler)
Executes HTTP request to the target using the given context and
processes the response using the given response handler.
|
HttpResponse execute(ClassicHttpRequest request) throws IOException
request
- the request to executeIOException
- in case of a problem or the connection was aborted<T> T execute(ClassicHttpRequest request, HttpClientResponseHandler<? extends T> responseHandler) throws IOException
Implementing classes are required to ensure that the content entity
associated with the response is fully consumed and the underlying
connection is released back to the connection manager automatically
in all cases relieving individual HttpClientResponseHandler
s from
having to manage resource deallocation internally.
request
- the request to executeresponseHandler
- the response handlerIOException
- in case of a problem or the connection was abortedHttpResponse execute(ClassicHttpRequest request, HttpContext context) throws IOException
request
- the request to executecontext
- the context to use for the execution, or
null
to use the default contextIOException
- in case of a problem or the connection was aborted<T> T execute(ClassicHttpRequest request, HttpContext context, HttpClientResponseHandler<? extends T> responseHandler) throws IOException
Implementing classes are required to ensure that the content entity
associated with the response is fully consumed and the underlying
connection is released back to the connection manager automatically
in all cases relieving individual HttpClientResponseHandler
s from
having to manage resource deallocation internally.
request
- the request to executecontext
- the context to use for the execution, or
null
to use the default contextresponseHandler
- the response handlerIOException
- in case of a problem or the connection was abortedClassicHttpResponse execute(HttpHost target, ClassicHttpRequest request) throws IOException
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executeIOException
- in case of a problem or the connection was aborted<T> T execute(HttpHost target, ClassicHttpRequest request, HttpClientResponseHandler<? extends T> responseHandler) throws IOException
Implementing classes are required to ensure that the content entity
associated with the response is fully consumed and the underlying
connection is released back to the connection manager automatically
in all cases relieving individual HttpClientResponseHandler
s from
having to manage resource deallocation internally.
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executeresponseHandler
- the response handlerIOException
- in case of a problem or the connection was abortedHttpResponse execute(HttpHost target, ClassicHttpRequest request, HttpContext context) throws IOException
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executecontext
- the context to use for the execution, or
null
to use the default contextIOException
- in case of a problem or the connection was aborted<T> T execute(HttpHost target, ClassicHttpRequest request, HttpContext context, HttpClientResponseHandler<? extends T> responseHandler) throws IOException
Implementing classes are required to ensure that the content entity
associated with the response is fully consumed and the underlying
connection is released back to the connection manager automatically
in all cases relieving individual HttpClientResponseHandler
s from
having to manage resource deallocation internally.
target
- the target host for the request.
Implementations may accept null
if they can still determine a route, for example
to a default target or by inspecting the request.request
- the request to executecontext
- the context to use for the execution, or
null
to use the default contextresponseHandler
- the response handlerIOException
- in case of a problem or the connection was aborted