Request.Method, Request.Priority
Constructor and Description |
---|
StringRequest(int method,
java.lang.String url,
Response.Listener<java.lang.String> listener,
Response.ErrorListener errorListener)
Creates a new request with the given method.
|
StringRequest(java.lang.String url,
Response.Listener<java.lang.String> listener,
Response.ErrorListener errorListener)
Creates a new GET request.
|
Modifier and Type | Method and Description |
---|---|
protected void |
deliverResponse(java.lang.String response)
Subclasses must implement this to perform delivery of the parsed
response to their listeners.
|
protected Response<java.lang.String> |
parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response
and return an appropriate response type.
|
addMarker, cancel, compareTo, deliverError, getBody, getBodyContentType, getCacheEntry, getCacheKey, getErrorListener, getHeaders, getMethod, getParams, getParamsEncoding, getPostBody, getPostBodyContentType, getPostParams, getPostParamsEncoding, getPriority, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, isCanceled, markDelivered, parseNetworkError, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setShouldRetryServerErrors, setTag, shouldCache, shouldRetryServerErrors, toString
public StringRequest(int method, java.lang.String url, Response.Listener<java.lang.String> listener, Response.ErrorListener errorListener)
method
- the request Method
to useurl
- URL to fetch the string atlistener
- Listener to receive the String responseerrorListener
- Error listener, or null to ignore errorspublic StringRequest(java.lang.String url, Response.Listener<java.lang.String> listener, Response.ErrorListener errorListener)
url
- URL to fetch the string atlistener
- Listener to receive the String responseerrorListener
- Error listener, or null to ignore errorsprotected void deliverResponse(java.lang.String response)
Request
deliverResponse
in class Request<java.lang.String>
response
- The parsed response returned by
Request.parseNetworkResponse(NetworkResponse)
protected Response<java.lang.String> parseNetworkResponse(NetworkResponse response)
Request
parseNetworkResponse
in class Request<java.lang.String>
response
- Response from the network