Struct poem::Request[][src]

pub struct Request { /* fields omitted */ }
Expand description

Represents an HTTP request.

Implementations

Creates a new Request with the given components parts and body.

Creates a request builder.

Returns a reference to the associated HTTP method.

Sets the HTTP method for this request.

Returns a reference to the associated URI.

Returns a mutable reference to the associated URI.

Returns a reference to the associated original URI.

Returns the associated version.

Sets the version for this request.

Returns a reference to the associated header map.

Returns a mutable reference to the associated header map.

Returns the string value of the specified header.

NOTE: Returns None if the header value is not a valid UTF8 string.

Returns the path parameter with the specified name.

Deserialize path parameters.

See also Path

Deserialize query parameters.

See also Path

Returns the content type of this request.

Returns a reference to the associated extensions.

Returns a mutable reference to the associated extensions.

Get a reference from extensions, similar to self.extensions().get().

Inserts a value to extensions, similar to self.extensions().insert(data).

Returns a reference to the remote address.

Returns a reference to the local address.

This is supported on crate feature cookie only.

Returns a reference to the CookieJar

Sets the body for this request.

Take the body from this request and sets the body to empty.

Consume this request and return its inner body.

Returns the parameters used by the extractor.

Consumes the request returning the head and body parts.

Upgrade the connection and return a stream.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

The error type of this extractor. Read more

Perform the extraction.

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.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more