public class JSONObjectCallback extends AbstractHttpRequestCallback<org.json.simple.JSONObject>
HttpRequestCallback that parses the response body as a JSONObject.
Optionally, the RestConstants#JSON_DATA object can be returned (first child of
root JSON) if the property 'extractData' is set to true.
| Constructor and Description |
|---|
JSONObjectCallback(boolean extractData) |
| Modifier and Type | Method and Description |
|---|---|
org.json.simple.JSONObject |
onCallSuccess(org.apache.http.HttpResponse method)
Called when call was successful.
|
onCallExceptionpublic JSONObjectCallback(boolean extractData)
extractData - true, if the 'data' object (RestConstants#JSON_DATA) should be returned
instead of the whole JSON-body.public org.json.simple.JSONObject onCallSuccess(org.apache.http.HttpResponse method)
HttpRequestCallbackCopyright © 2014. All rights reserved.