Skip to main content

Module request

Module request 

Source
Expand description

HTTP request type and helper methods.

Cot uses the Request type from the http crate to represent incoming HTTP requests. However, it also provides a RequestExt trait that contains various helper methods for working with HTTP requests. These methods are used to access the application context, project configuration, path parameters, and more. You probably want to have a use statement for RequestExt in your code most of the time to be able to use these functions:

use cot::request::RequestExt;

Modules§

extractors
Extractors for request data.

Structs§

PathParams
Path parameters extracted from the request URL, and available as a map of strings.
PathParamsDeserializerError
An error that occurs when deserializing path parameters.

Traits§

RequestExt
Extension trait for http::Request that provides helper methods for working with HTTP requests.

Type Aliases§

Request
HTTP request type.
RequestHead
HTTP request head type.