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.
Sets the HTTP method for this request.
Returns a reference to the associated original URI.
Sets the version for this request.
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.
cookie
only.Returns a reference to the CookieJar
Consumes the request returning the head and body parts.
Upgrade the connection and return a stream.
Trait Implementations
type Error = Infallible
type Error = Infallible
The error type of this extractor. Read more
fn from_request<'life0, 'async_trait>(
req: &'a Request,
_body: &'life0 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'a Request,
_body: &'life0 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Perform the extraction.
Auto Trait Implementations
impl !RefUnwindSafe for Request
impl !UnwindSafe for Request
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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