pub struct RequestInfo {
pub method: String,
pub path: String,
pub headers: HashMap<String, String>,
pub raw_body: String,
}Expand description
HTTP request metadata forwarded to TypeScript actions invoked via
defineRoute bindings. All fields are strings so the TS side can use
them directly without re-parsing.
Fields§
§method: StringUppercased method — POST, GET, etc.
path: StringFull request path (with query string if any).
headers: HashMap<String, String>Lowercased header names → values. Multi-value headers are joined
with , per RFC 7230. This trades some fidelity for a map shape
that’s ergonomic to consume from TS.
raw_body: StringThe exact bytes of the request body, UTF-8-decoded. Webhook signature verification (Stripe, GitHub) needs the bytes that were signed, so this is NOT the parsed JSON.
Trait Implementations§
Source§impl Clone for RequestInfo
impl Clone for RequestInfo
Source§fn clone(&self) -> RequestInfo
fn clone(&self) -> RequestInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestInfo
impl Debug for RequestInfo
Source§impl<'de> Deserialize<'de> for RequestInfo
impl<'de> Deserialize<'de> for RequestInfo
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 RequestInfo
impl RefUnwindSafe for RequestInfo
impl Send for RequestInfo
impl Sync for RequestInfo
impl Unpin for RequestInfo
impl UnsafeUnpin for RequestInfo
impl UnwindSafe for RequestInfo
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