Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Protocols
Protocols.HTTP
Protocols.HTTP.Query

Method Protocols.HTTP.Query()->set_callbacks()


Method set_callbacks

Protocols.HTTP.Query set_callbacks(function request_ok, function request_fail, mixed ... extra)
Protocols.HTTP.Query async_request(string server, int port, string query)
Protocols.HTTP.Query async_request(string server, int port, string query, mapping headers, string|void data)

Description

Setup and run an asynchronous request, otherwise similar to thread_request() .

request_ok (Protocols.HTTP.Query httpquery,...extra args) will be called when connection is complete, and headers are parsed.

request_fail (Protocols.HTTP.Query httpquery,...extra args) is called if the connection fails.

Returns

Returns the called object