HTTP completion callback.
Type Params | Return Type | Name and description |
---|---|---|
|
void |
completed(META meta, InputStream entity, Throwable error) Method to invoke when the HTTP exchange is finished. |
Method to invoke when the HTTP exchange is finished.
In case of failed network or cancelled request, the META
must be null
and the
error
should be non-null
. In case the server responds with an HTTP error,
META
must be non-null
and error
must be null
. The
second argument, the InputStream
, can be null
if the HTTP response
didn't have an entity body.
The Session will close the input stream when done with it.
meta
- information about the response, or null
entity
- response entity or null
error
- information about failure to talk to the server, or null