public interface HttpResponse
| Modifier and Type | Method and Description |
|---|---|
java.lang.Exception |
getError()
Returns the request error if it failed
|
int |
getStatus()
Returns the HTTP status code of the response.
|
HttpResponse |
onComplete(java.lang.Runnable runnable)
Creates a callback to be called when the response is finished (successful or unsuccessful).
|
HttpResponse |
onError(java.lang.Runnable runnable)
Creates a callback to be called when the request has failed.
|
HttpResponse |
onSuccess(java.lang.Runnable runnable)
Creates a callback to be called when the request has succeeded.
|
java.lang.String |
stringBody()
Blocks and then returns the response from the server
|
void |
waitForCompletionAndClose()
This is a terminal method that will block the thread called on until the http request has
been processed.
|
HttpResponse onComplete(java.lang.Runnable runnable)
runnable - a callback methodHttpResponse onError(java.lang.Runnable runnable)
runnable - a callback methodHttpResponse onSuccess(java.lang.Runnable runnable)
runnable - a callback methodint getStatus()
void waitForCompletionAndClose()
java.lang.String stringBody()
java.lang.Exception getError()