pub struct Request {
pub route: String,
pub host: String,
pub request_type: RequestType,
pub query: HashMap<String, String>,
pub cookie: HashMap<String, String>,
pub body: String,
}Expand description
A request. Containing some of the requests data.
§Examples
// The request is a GET request on the "127.0.0.1:5000/api?id=15" path with no active cookies.
// Then the request will be:
Request {
route: "/api?id=15",
host: "127.0.0.1:5000",
request_type: RequestType::Get,
query: HashMap {id: "15"},
cookies: HashMap {},
body: "",
}Fields§
§route: String§host: String§request_type: RequestType§query: HashMap<String, String>§body: StringTrait Implementations§
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more