public class

HurlStack

extends Object
implements HttpStack
java.lang.Object
   ↳ com.android.volley.toolbox.HurlStack

Class Overview

An HttpStack based on HttpURLConnection.

Summary

Nested Classes
interface HurlStack.UrlRewriter An interface for transforming URLs before use. 
Public Constructors
HurlStack()
HurlStack(HurlStack.UrlRewriter urlRewriter)
HurlStack(HurlStack.UrlRewriter urlRewriter, SSLSocketFactory sslSocketFactory)
Public Methods
HttpResponse performRequest(Request<?> request, Map<String, String> additionalHeaders)
Performs an HTTP request with the given parameters.
Protected Methods
HttpURLConnection createConnection(URL url)
Create an HttpURLConnection for the specified url.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.android.volley.toolbox.HttpStack

Public Constructors

public HurlStack ()

public HurlStack (HurlStack.UrlRewriter urlRewriter)

Parameters
urlRewriter Rewriter to use for request URLs

public HurlStack (HurlStack.UrlRewriter urlRewriter, SSLSocketFactory sslSocketFactory)

Parameters
urlRewriter Rewriter to use for request URLs
sslSocketFactory SSL factory to use for HTTPS connections

Public Methods

public HttpResponse performRequest (Request<?> request, Map<String, String> additionalHeaders)

Performs an HTTP request with the given parameters.

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().

Parameters
request the request to perform
additionalHeaders additional headers to be sent together with getHeaders()
Returns
  • the HTTP response
Throws
AuthFailureError
IOException

Protected Methods

protected HttpURLConnection createConnection (URL url)

Create an HttpURLConnection for the specified url.

Throws
IOException