pub struct RequestContext {
pub method: String,
pub url: String,
pub headers: HashMap<String, String>,
pub body: Option<String>,
pub extensions: HashMap<String, String>,
}Expand description
Context provided to middleware before a request is sent.
Fields§
§method: StringHTTP method (GET, POST, PUT, DELETE).
url: StringFull URL being requested.
headers: HashMap<String, String>Request headers that can be modified.
body: Option<String>Optional request body (for POST/PUT).
extensions: HashMap<String, String>Custom data that can be passed between on_request and on_response.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RequestContext
impl RefUnwindSafe for RequestContext
impl Send for RequestContext
impl Sync for RequestContext
impl Unpin for RequestContext
impl UnwindSafe for RequestContext
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