Modifier and Type | Class and Description |
---|---|
static class |
HttpClientStack.HttpPatch
The HttpPatch class does not exist in the Android framework, so this has been defined here.
|
Modifier and Type | Field and Description |
---|---|
protected HttpClient |
mClient |
Constructor and Description |
---|
HttpClientStack(HttpClient client) |
Modifier and Type | Method and Description |
---|---|
protected void |
onPrepareRequest(HttpUriRequest request)
Called before the request is executed using the underlying HttpClient.
|
HttpResponse |
performRequest(Request<?> request,
Map<String,String> additionalHeaders)
Performs an HTTP request with the given parameters.
|
public HttpResponse performRequest(Request<?> request, Map<String,String> additionalHeaders) throws 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()
IOException
AuthFailureError
protected void onPrepareRequest(HttpUriRequest request) throws IOException
Overwrite in subclasses to augment the request.
IOException