java.lang.Object | ||
↳ | com.android.volley.Request<T> | |
↳ | com.android.volley.toolbox.StringRequest |
A canned request for retrieving the response body at a given URL as a String.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
StringRequest(int method, String url, Listener<String> listener, Response.ErrorListener errorListener)
Creates a new request with the given method.
| |||||||||||
StringRequest(String url, Listener<String> listener, Response.ErrorListener errorListener)
Creates a new GET request.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
deliverResponse(String response)
Subclasses must implement this to perform delivery of the parsed
response to their listeners.
| ||||||||||
Response<String> |
parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response
and return an appropriate response type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.android.volley.Request
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Comparable
|
Creates a new request with the given method.
method | the request Method to use |
---|---|
url | URL to fetch the string at |
listener | Listener to receive the String response |
errorListener | Error listener, or null to ignore errors |
Creates a new GET request.
url | URL to fetch the string at |
---|---|
listener | Listener to receive the String response |
errorListener | Error listener, or null to ignore errors |
Subclasses must implement this to perform delivery of the parsed response to their listeners. The given response is guaranteed to be non-null; responses that fail to parse are not delivered.
response | The parsed response returned by
parseNetworkResponse(NetworkResponse)
|
---|
Subclasses must implement this to parse the raw network response and return an appropriate response type. This method will be called from a worker thread. The response will not be delivered if you return null.
response | Response from the network |
---|