HttpRequest

The data which the server provides to HttpRequestHandlers so that they can formulate a response.

Members

Variables

clientSocket
Socket clientSocket;

The underlying socket that the request was received from, and to which the response will be written.

headers
string[string] headers;

An associative array containing all request headers.

method
string method;

The HTTP method verb, such as GET, POST, PUT, etc.

params
string[string] params;

An associative array containing all request params, if any were given.

pathParams
string[string] pathParams;

An associative array containing any path parameters obtained from the request url. These are only populated in cases where it is possible to parse path parameters, such as with a PathDelegatingHandler.

server
HttpServer server;

A reference to the HttpServer that is handling this request.

url
string url;

The url of the request, excluding query parameters.

ver
int ver;

The request version.

Meta