Pike v8.0 release 1738

Class Protocols.HTTP.Session()->Request

Description

Request


Variable con

Query Protocols.HTTP.Session.Request.con

Description

Raw connection object


Variable cookie_encountered

function(string, Standards.URI:mixed) Protocols.HTTP.Session.Request.cookie_encountered

Description

Cookie callback. When a request is performed, the result is checked for cookie changes and additions. If a cookie is encountered, this function is called. Default is to call set_http_cookie in the Session object.


Variable follow_redirects

int Protocols.HTTP.Session.Request.follow_redirects

Description

Number of redirects to follow; the request will perform another request if the HTTP answer is a 3xx redirect. Default from the parent Session.follow_redirects.

A redirect automatically turns into a GET request, and all header, query, post or put information is dropped.

Bugs

Loops will currently not be detected, only the limit works to stop loops.


Variable url_requested

Standards.URI Protocols.HTTP.Session.Request.url_requested

Description

URL requested (set by prepare_method). This will update according to followed redirects.


Method destroy

void destroy()

Description

destroy is called when an object is destructed. But since this clears the HTTP connection from the Request object, it can also be used to reuse a Request object.