http_type/request/
type.rs

1use crate::*;
2
3/// HTTP request method.
4pub type RequestMethod = Method;
5/// The host part of an HTTP request.
6pub type RequestHost = String;
7/// The HTTP version (e.g., HTTP/1.1).
8pub type RequestVersion = HttpVersion;
9/// The path portion of the request URL.
10pub type RequestPath = String;
11/// Key type used in the request query parameters.
12pub type RequestQuerysKey = String;
13/// Value type used in the request query parameters.
14pub type RequestQuerysValue = String;
15/// All query parameters parsed from the request URL.
16pub type RequestQuerys = HashMapXxHash3_64<RequestQuerysKey, RequestQuerysValue>;
17/// The raw binary body of the request.
18pub type RequestBody = Vec<u8>;
19/// The request body as a UTF-8 string.
20pub type RequestBodyString = String;
21/// Key type used in the request headers.
22pub type RequestHeadersKey = String;
23/// Value type used in the request headers.
24pub type RequestHeadersValue = String;
25/// All headers sent with the HTTP request.
26pub type RequestHeaders = HashMapXxHash3_64<RequestHeadersKey, RequestHeadersValue>;
27/// The result type returned from a request reader handler.
28pub type RequestReaderHandleResult = Result<Request, RequestError>;
29/// Read guard for a `Request` wrapped in a `RwLock`.
30pub type RwLockReadGuardRequest<'a> = RwLockReadGuard<'a, Request>;
31/// Write guard for a `Request` wrapped in a `RwLock`.
32pub type RwLockWriteGuardRequest<'a> = RwLockWriteGuard<'a, Request>;
33/// Optional value for a query parameter.
34pub type OptionRequestQuerysValue = Option<RequestQuerysValue>;
35/// Optional value for a header.
36pub type OptionRequestHeadersValue = Option<RequestHeadersValue>;