A single HTTP request being parsed from and replied to over a client connection.

Synopsis

Declared in <httpserver.h>

class HTTPRequest;

Enums

Name

Description

State

Stage of request parsing, tracking how much of the request has been read.

Member Functions

Name

Description

HTTPRequest [constructor]

Constructors

GetChunkProgress

Returns how many bytes of the current chunk have been read.

GetChunkSize

Returns the size of the current chunk when using chunked transfer encoding.

GetClient

Returns the client connection this request arrived on.

GetHeader

Look up a request header value.

GetPeer

Returns the address of the peer that sent the request.

GetQueryParameter

Look up a query‐string parameter from the request target.

GetRequestMethod

Returns the HTTP method of the request.

GetState

Returns the current parsing state of the request.

GetURI

Returns the request target (URI) of the request.

GetVersion

Returns the HTTP protocol version of the request.

LoadBody

Parse the request body from the receive buffer.

LoadControlData

Methods that attempt to parse HTTP request fields line‐by‐line from a receive buffer.

LoadHeaders

Parse the request line's headers section from the receive buffer.

ReadBody

Returns the request body read so far.

SetState

Set the current parsing state of the request.

WriteHeader

Set a header to be included in the response.

WriteReply

WriteReply overloads

Created with MrDocs