Call

A call is a request that has been prepared for execution. A call can be canceled. As this object represents a single request/response pair (stream), it cannot be executed twice.

Members

Functions

cancel
void cancel()

Cancels the request, if possible. Requests that are already complete cannot be canceled.

enqueue
void enqueue(Callback responseCallback)

Schedules the request to be executed at some point in the future.

execute
Response execute()

Invokes the request immediately, and blocks until the response can be processed or is in error.

isCanceled
bool isCanceled()
Undocumented in source.
isExecuted
bool isExecuted()

Returns true if this call has been either {@linkplain #execute() executed} or {@linkplain #enqueue(Callback) enqueued}. It is an error to execute a call more than once.

request
Request request()

Returns the original request that initiated this call.

Meta