Pike v8.1 release 6

Method Protocols.HTTP.do_method()


Method do_method

.Query do_method(string method, string|Standards.URI url, void|mapping(string:int|string|array(string)) query_variables, void|mapping(string:string|array(string)) request_headers, void|Protocols.HTTP.Query con, void|string data)

Description

Low level HTTP call method.

Parameter method

The HTTP method to use, e.g. "GET".

Parameter url

The URL to perform method on. Should be a complete URL, including protocol, e.g. "https://pike.lysator.liu.se/".

Parameter query_variables

Calls http_encode_query and appends the result to the URL.

Parameter request_headers

The HTTP headers to be added to the request. By default the headers User-agent, Host and, if needed by the url, Authorization will be added, with generated contents. Providing these headers will override the default. Setting the value to 0 will remove that header from the request.

Parameter con

Old connection object.

Parameter data

Data payload to be transmitted in the request.

See also

do_sync_method()