Class Protocols.HTTP.Promise.Result

Description

HTTP result class.

A class representing a request and its response. An instance of this class will be given as argument to the Concurrent.Future()->on_success() and Concurrent.Future()->on_failure() callbacks registered on the returned Concurrent.Future object from get_url(), post_url(), delete_url(), put_url() or do_method().


Variable charset

string|zero Protocols.HTTP.Promise.Result.charset

Description

Returns the charset of the requested document, if given by the response headers.

Note

Read only


Variable content_encoding

string Protocols.HTTP.Promise.Result.content_encoding

Description

Returns the content encoding of the response if set by the remote server.

Note

Read only


Variable content_type

string Protocols.HTTP.Promise.Result.content_type

Description

Returns the content type of the requested document

Note

Read only


Variable data

string Protocols.HTTP.Promise.Result.data

Description

Raw data body of the request

See also

get()


Variable extra_args

array(mixed) Protocols.HTTP.Promise.Result.extra_args

Description

Extra arguments set in the Arguments object.


Variable headers

mapping Protocols.HTTP.Promise.Result.headers

Description

The HTTP response headers


Variable host

string Protocols.HTTP.Promise.Result.host

Description

The host that was called in the request


Variable length

int Protocols.HTTP.Promise.Result.length

Description

Returns the value of the content-length header.

Note

Read only


Variable status

int Protocols.HTTP.Promise.Result.status

Description

The HTTP status of the response, e.g 200, 201, 404 and so on.


Variable status_description

string Protocols.HTTP.Promise.Result.status_description

Description

The textual representation of status.


Variable url

Standards.URI Protocols.HTTP.Promise.Result.url

Description

Returns the requested URL