http_type/request/
type.rs1use super::error::Error as RequestError;
2use crate::*;
3
4pub type RequestMethod = String;
6
7pub type RequestHost = String;
9
10pub type RequestPath = String;
12
13pub type RequestQuerysKey = String;
15
16pub type RequestQuerysValue = String;
18
19pub type RequestQuerys = HashMap<RequestQuerysKey, RequestQuerysValue>;
21
22pub type RequestBody = Vec<u8>;
24
25pub type RequestHeadersKey = String;
27
28pub type RequestHeadersValue = String;
30
31pub type RequestHeaders = HashMap<RequestHeadersKey, RequestHeadersValue>;
33
34pub type RequestNewResult = Result<Request, RequestError>;
36
37#[derive(Debug, Clone, Lombok, PartialEq, Eq)]
47pub struct Request {
48 #[set(skip)]
49 pub(super) method: RequestMethod,
50 #[set(skip)]
51 pub(super) host: RequestHost,
52 #[set(skip)]
53 pub(super) path: RequestPath,
54 pub(super) querys: RequestQuerys,
55 pub(super) headers: RequestHeaders,
56 #[set(skip)]
57 pub(super) body: RequestBody,
58}