feat: pass headers to request

This commit is contained in:
Valerio Ageno
2024-06-12 13:20:44 +02:00
parent 0d33e6887b
commit 5b11f68fbb
+2 -2
View File
@@ -6,7 +6,7 @@ use axum::http::{HeaderMap, Uri};
#[derive(Debug, Clone)]
pub struct Request<'a> {
uri: &'a Uri,
headers: &'a HeaderMap,
pub headers: &'a HeaderMap,
pub params: HashMap<String, String>,
}
@@ -38,7 +38,7 @@ impl<'a> Request<'a> {
Location {
href: self.uri.to_string(),
pathname: &self.uri.path(),
// TODO: hanler search map
// TODO: handler search map
search: HashMap::new(),
search_str: &self.uri.query().unwrap_or(""),
hash: "",