public abstract static class HttpClient.HttpCallback extends Object
Callback interface, specifically targeted at
expecting and handling JSON response bodies.| Constructor and Description |
|---|
HttpClient.HttpCallback() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
onFailure(Throwable error)
Called when the HTTP request failed or had an error response.
|
void |
onJsonParseError(JSONException error,
String rawBody)
Invoked when the HTTP request was successful, but the response body could not
be parsed as a JSON object.
|
abstract void |
onSuccess(JSONObject response)
Called when an HTTP response was successfully returned from the WVA,
and the response was successfully parsed as a JSON object.
|
public abstract void onSuccess(JSONObject response)
response - the JSON object from the HTTP responsepublic abstract void onFailure(Throwable error)
error - the Throwable causing the failurepublic void onJsonParseError(JSONException error, String rawBody)
onFailure(Throwable).error - the JSONException raised while parsing the response bodyrawBody - the body which could not be parsed as JSON