http_type/request/
type.rs1use super::error::Error as RequestError;
2use crate::*;
3
4pub type RequestMethod = String;
6pub type RequestHost = String;
8pub type RequestPath = String;
10pub type RequestQuerysKey = String;
12pub type RequestQuerysValue = String;
14pub type RequestQuerys = HashMap<RequestQuerysKey, RequestQuerysValue>;
16pub type RequestBody = Vec<u8>;
18pub type RequestHeadersKey = String;
20pub type RequestHeadersValue = String;
22pub type RequestHeaders = HashMap<RequestHeadersKey, RequestHeadersValue>;
24pub type RequestNewResult = Result<Request, RequestError>;
26
27#[derive(Debug, Clone, Lombok, PartialEq, Eq)]
37pub struct Request {
38 #[set(skip)]
39 pub(super) method: RequestMethod,
40 #[set(skip)]
41 pub(super) host: RequestHost,
42 #[set(skip)]
43 pub(super) path: RequestPath,
44 pub(super) querys: RequestQuerys,
45 pub(super) headers: RequestHeaders,
46 #[set(skip)]
47 pub(super) body: RequestBody,
48}