http_type/request/
type.rs1use super::error::Error as RequestError;
2use crate::*;
3
4pub type RequestMethod = Methods;
6pub type RequestHost = String;
8pub type RequestVersion = HttpVersion;
10pub type RequestPath = String;
12pub type RequestQuerysKey = String;
14pub type RequestQuerysValue = String;
16pub type RequestQuerys = HashMap<RequestQuerysKey, RequestQuerysValue>;
18pub type RequestBody = Vec<u8>;
20pub type RequestUpgradeType = UpgradeType;
22pub type RequestHeadersKey = String;
24pub type RequestHeadersValue = String;
26pub type RequestHeaders = HashMap<RequestHeadersKey, RequestHeadersValue>;
28pub type RequestNewResult = Result<Request, RequestError>;
30
31#[derive(Debug, Clone, Lombok, PartialEq, Eq)]
43pub struct Request {
44 #[set(skip)]
45 pub(super) method: RequestMethod,
46 #[set(skip)]
47 pub(super) host: RequestHost,
48 #[set(skip)]
49 pub(super) version: RequestVersion,
50 #[set(skip)]
51 pub(super) path: RequestPath,
52 pub(super) querys: RequestQuerys,
53 pub(super) headers: RequestHeaders,
54 #[set(skip)]
55 pub(super) body: RequestBody,
56 #[set(skip)]
57 pub(super) upgrade_type: RequestUpgradeType,
58}