pub struct Request {
pub method: String,
pub url: String,
pub headers: BTreeMap<String, String>,
pub body: Option<String>,
}Expand description
HTTP request as captured by the customer or the proxy.
headers is a BTreeMap for deterministic iteration — it ends
up in curl reproductions and in snapshot tests, both of which
require byte-stability.
Fields§
§method: StringHTTP method, e.g. "POST".
url: StringFull request URL (scheme + host + path + query).
headers: BTreeMap<String, String>Request headers. Header names should be lower-cased on disk so
that case-insensitive lookups via header work consistently.
body: Option<String>Raw request body. Stored as a string so HMAC verification sees
exactly the bytes the client sent (no JSON re-serialisation).
None means no body was sent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin 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