public class CBRequest extends CBNetworkRequest<JSONObject>
| Modifier and Type | Class and Description |
|---|---|
static interface |
CBRequest.CBAPINetworkResponseCallback
NETWORK RESPONSE CALLBACK CLASS AND INTERFACES
|
CBNetworkRequest.Method| Modifier and Type | Field and Description |
|---|---|
JSONObject |
body |
CBRequest.CBAPINetworkResponseCallback |
callback |
boolean |
checkStatusInResponseBody |
protected PrivacyPresenter |
mPrivacyPresenter |
protected RequestBodyFields |
requestBodyFields |
dispatch, DISPATCH_ASYNC, DISPATCH_UI, getResponseCodeNs, method, outputFile, priority, processingNs, readDataNs, status, STATUS_CANCELED, STATUS_PROCESSING, STATUS_QUEUED, uri| Constructor and Description |
|---|
CBRequest(java.lang.String endpoint,
java.lang.String path,
RequestBodyFields requestBodyFields,
CBTrack track,
int priority,
CBRequest.CBAPINetworkResponseCallback callback,
PrivacyPresenter privacyPresenter) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendBodyArgument(java.lang.String key,
java.lang.Object value) |
void |
appendRequestBodyInfoParams()
Append information about device
|
CBNetworkRequestInfo |
buildRequestInfo() |
void |
deliverError(CBError error,
CBNetworkServerResponse serverResponse)
respond to a failed network request on the UI thread
|
void |
deliverResponse(JSONObject json,
CBNetworkServerResponse serverResponse)
respond to a successful network request on the UI thread
|
java.lang.String |
getDescription()
DEBUGGING
|
java.lang.String |
getEventType() |
java.lang.String |
getPath()
SETTERS AND GETTERS
|
CBNetworkRequestResult<JSONObject> |
parseServerResponse(CBNetworkServerResponse response) |
void |
setEventType(java.lang.String eventType) |
java.lang.String |
uri()
Return the URI of this request based on its path and any query parameters.
|
cancelpublic JSONObject body
public final CBRequest.CBAPINetworkResponseCallback callback
public boolean checkStatusInResponseBody
protected final RequestBodyFields requestBodyFields
protected final PrivacyPresenter mPrivacyPresenter
public CBRequest(java.lang.String endpoint,
java.lang.String path,
RequestBodyFields requestBodyFields,
CBTrack track,
int priority,
CBRequest.CBAPINetworkResponseCallback callback,
PrivacyPresenter privacyPresenter)
public void appendBodyArgument(java.lang.String key,
java.lang.Object value)
public void appendRequestBodyInfoParams()
public java.lang.String uri()
public java.lang.String getPath()
public java.lang.String getEventType()
public void setEventType(java.lang.String eventType)
public CBNetworkRequestInfo buildRequestInfo()
buildRequestInfo in class CBNetworkRequest<JSONObject>public CBNetworkRequestResult<JSONObject> parseServerResponse(CBNetworkServerResponse response)
parseServerResponse in class CBNetworkRequest<JSONObject>public void deliverResponse(JSONObject json,
CBNetworkServerResponse serverResponse)
deliverResponse in class CBNetworkRequest<JSONObject>public void deliverError(CBError error, CBNetworkServerResponse serverResponse)
deliverError in class CBNetworkRequest<JSONObject>public java.lang.String getDescription()