Modifier and Type | Field and Description |
---|---|
protected org.apache.http.client.HttpClient |
mClient |
Constructor and Description |
---|
HttpClientStack(org.apache.http.client.HttpClient client) |
Modifier and Type | Method and Description |
---|---|
protected void |
onPrepareRequest(org.apache.http.client.methods.HttpUriRequest request)
Called before the request is executed using the underlying HttpClient.
|
org.apache.http.HttpResponse |
performRequest(Request<?> request,
java.util.Map<java.lang.String,java.lang.String> additionalHeaders)
Performs an HTTP request with the given parameters.
|
public org.apache.http.HttpResponse performRequest(Request<?> request, java.util.Map<java.lang.String,java.lang.String> additionalHeaders) throws java.io.IOException, AuthFailureError
HttpStack
A GET request is sent if request.getPostBody() == null. A POST request is sent otherwise, and the Content-Type header is set to request.getPostBodyContentType().
performRequest
in interface HttpStack
request
- the request to performadditionalHeaders
- additional headers to be sent together with
Request.getHeaders()
java.io.IOException
AuthFailureError
protected void onPrepareRequest(org.apache.http.client.methods.HttpUriRequest request) throws java.io.IOException
Overwrite in subclasses to augment the request.
java.io.IOException