HurlStack
or another
BaseHttpStack
implementation.@Deprecated public class HttpClientStack extends java.lang.Object implements HttpStack
HttpClient
.Modifier and Type | Class and Description |
---|---|
static class |
HttpClientStack.HttpPatch
Deprecated.
The HttpPatch class does not exist in the Android framework, so this has been defined here.
|
Modifier and Type | Field and Description |
---|---|
protected org.apache.http.client.HttpClient |
mClient
Deprecated.
|
Constructor and Description |
---|
HttpClientStack(org.apache.http.client.HttpClient client)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
onPrepareRequest(org.apache.http.client.methods.HttpUriRequest request)
Deprecated.
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)
Deprecated.
Performs an HTTP request with the given parameters.
|
public HttpClientStack(org.apache.http.client.HttpClient client)
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