T - The type of the expected response.public interface HttpRequest<T>
| Modifier and Type | Method and Description |
|---|---|
Headers |
headers()
|
HttpMethod |
method()
Returns the HTTP method of this request.
|
HttpRequestEntity |
requestEntity()
Returns an
HttpRequestEntity that contains the body of this request. |
HttpResponseHandler<T> |
responseHandler(HttpResponse response)
Returns a handler for the response.
|
HttpMethod method()
HttpMethod this request uses.HttpRequestEntity requestEntity()
HttpRequestEntity that contains the body of this request.HttpRequestEntity object, never null.HttpResponseHandler<T> responseHandler(HttpResponse response) throws java.io.IOException, ProtocolError, ProtocolException
response - The HttpResponse that needs to be handled.HttpResponseHandler.java.io.IOExceptionProtocolError - If the response is an error response as specified by the application protocol.ProtocolException - If the response is invalid or malformed and can not be handled properly.