alux_http_rocket/
message.rs1use rocket::http::HeaderMap;
4
5#[derive(Debug, Clone)]
7pub struct RocketRequest {
8 pub(crate) captures: Vec<String>,
9 pub(crate) query: String,
10 pub(crate) headers: HeaderMap<'static>,
11 pub(crate) body: Vec<u8>,
12}
13
14impl RocketRequest {
15 pub fn captures(&self) -> &[String] {
17 &self.captures
18 }
19
20 pub fn query(&self) -> &str {
22 &self.query
23 }
24
25 pub fn headers(&self) -> &HeaderMap<'static> {
27 &self.headers
28 }
29
30 pub fn body(&self) -> &[u8] {
32 &self.body
33 }
34}