public abstract class BaseHttpStack extends java.lang.Object implements HttpStack
| Constructor and Description |
|---|
BaseHttpStack() |
| Modifier and Type | Method and Description |
|---|---|
abstract HttpResponse |
executeRequest(Request<?> request,
java.util.Map<java.lang.String,java.lang.String> additionalHeaders)
Performs an HTTP request with the given parameters.
|
org.apache.http.HttpResponse |
performRequest(Request<?> request,
java.util.Map<java.lang.String,java.lang.String> additionalHeaders)
Deprecated.
use
executeRequest(com.android.volley.Request<?>, java.util.Map<java.lang.String, java.lang.String>) instead to avoid a dependency on the deprecated
Apache HTTP library. Nothing in Volley's own source calls this method. However, since
BasicNetwork.mHttpStack is exposed to subclasses, we provide this implementation
in case legacy client apps are dependent on that field. This method may be removed in a
future release of Volley. |
public abstract HttpResponse executeRequest(Request<?> request, java.util.Map<java.lang.String,java.lang.String> additionalHeaders) throws java.io.IOException, AuthFailureError
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().
request - the request to performadditionalHeaders - additional headers to be sent together with Request.getHeaders()HttpResponsejava.net.SocketTimeoutException - if the request times outjava.io.IOException - if another I/O error occurs during the requestAuthFailureError - if an authentication failure occurs during the request@Deprecated public final org.apache.http.HttpResponse performRequest(Request<?> request, java.util.Map<java.lang.String,java.lang.String> additionalHeaders) throws java.io.IOException, AuthFailureError
executeRequest(com.android.volley.Request<?>, java.util.Map<java.lang.String, java.lang.String>) instead to avoid a dependency on the deprecated
Apache HTTP library. Nothing in Volley's own source calls this method. However, since
BasicNetwork.mHttpStack is exposed to subclasses, we provide this implementation
in case legacy client apps are dependent on that field. This method may be removed in a
future release of Volley.HttpStackA 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 HttpStackrequest - the request to performadditionalHeaders - additional headers to be sent together with Request.getHeaders()java.io.IOExceptionAuthFailureError