public class SslHttpStack extends Object implements com.android.volley.toolbox.HttpStack
Modifier and Type | Class and Description |
---|---|
static class |
SslHttpStack.HttpPatch
The HttpPatch class does not exist in the Android framework, so this has been defined here.
|
Modifier and Type | Field and Description |
---|---|
private static String |
HEADER_CONTENT_TYPE |
Constructor and Description |
---|
SslHttpStack() |
Modifier and Type | Method and Description |
---|---|
private static void |
addHeaders(HttpUriRequest httpRequest,
Map<String,String> headers) |
(package private) static HttpUriRequest |
createHttpRequest(com.android.volley.Request<?> request,
Map<String,String> additionalHeaders)
Creates the appropriate subclass of HttpUriRequest for passed in request.
|
private static List<NameValuePair> |
getPostParameterPairs(Map<String,String> postParams) |
protected void |
onPrepareRequest(HttpUriRequest request)
Called before the request is executed using the underlying HttpClient.
|
HttpResponse |
performRequest(com.android.volley.Request<?> request,
Map<String,String> additionalHeaders)
Performs an HTTP request with the given parameters.
|
private static void |
setEntityIfNonEmptyBody(HttpEntityEnclosingRequestBase httpRequest,
com.android.volley.Request<?> request) |
private static final String HEADER_CONTENT_TYPE
private static void addHeaders(HttpUriRequest httpRequest, Map<String,String> headers)
private static List<NameValuePair> getPostParameterPairs(Map<String,String> postParams)
public HttpResponse performRequest(com.android.volley.Request<?> request, Map<String,String> additionalHeaders) throws IOException, com.android.volley.AuthFailureError
com.android.volley.toolbox.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 com.android.volley.toolbox.HttpStack
request
- the request to performadditionalHeaders
- additional headers to be sent together with
Request.getHeaders()
IOException
com.android.volley.AuthFailureError
static HttpUriRequest createHttpRequest(com.android.volley.Request<?> request, Map<String,String> additionalHeaders) throws com.android.volley.AuthFailureError
com.android.volley.AuthFailureError
private static void setEntityIfNonEmptyBody(HttpEntityEnclosingRequestBase httpRequest, com.android.volley.Request<?> request) throws com.android.volley.AuthFailureError
com.android.volley.AuthFailureError
protected void onPrepareRequest(HttpUriRequest request) throws IOException
Overwrite in subclasses to augment the request.
IOException