pub struct Request<'a> {
pub method: &'a str,
pub url: &'a str,
pub headers: &'a [(&'a str, &'a str)],
pub body: Option<&'a [u8]>,
}Expand description
An HTTP request to be signed or verified.
Framework-agnostic, zero-copy representation. Construct from whatever HTTP library you use (reqwest, hyper, axum, etc.).
Fields§
§method: &'a strHTTP method (e.g. "GET", "POST").
url: &'a strAbsolute URL (e.g. "https://api.example.com/path?q=1").
headers: &'a [(&'a str, &'a str)]Request headers as (name, value) pairs.
body: Option<&'a [u8]>Request body bytes (if any).
Trait Implementations§
impl<'a> Copy for Request<'a>
Auto Trait Implementations§
impl<'a> Freeze for Request<'a>
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> UnsafeUnpin for Request<'a>
impl<'a> UnwindSafe for Request<'a>
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