Struct rustdb::webtrans::HttpRequestParser[][src]

pub struct HttpRequestParser<'a> { /* fields omitted */ }
Expand description

Parser for http request.

A http request starts with a line with the method, target and protocol version. This is followed by header lines, terminated by a blank line. Each header line has the form name: value.

Headers define the content-type, content-length and cookies.

The content (optional) comes after the blank line that terminates the headers.

The target and content may also be parsed.

Supported content-types are ( or will be once multipart is done! )

(1) application/x-www-form-urlencoded : default encoding for forms when method is put.

Consists of name=value pairs, for example name1=value1&name2=value2….

[Reserved and] non-alphanumeric characters are replaced by ‘%HH’, a percent sign and two hexadecimal digits representing the ASCII code of the character.

target uses the same encoding for the “query string”, the portion of the target that follows the path, and begins with “?”.

See https://url.spec.whatwg.org/#application/x-www-form-urlencoded

(2) multipart/form-data - typically for uploading files, see https://www.ietf.org/rfc/rfc2388.txt and https://www.w3.org/TR/html401/interact/forms.html.

Implementations

Get Method, path, query and protocol version.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.