pub struct LambdaRequest {
pub method: Method,
pub path: String,
pub query_string: Option<String>,
pub headers: HashMap<String, String>,
pub body: Bytes,
pub path_parameters: HashMap<String, String>,
pub stage_variables: HashMap<String, String>,
pub request_context: RequestContext,
}Expand description
Wrapper for Lambda HTTP requests.
Fields§
§method: MethodHTTP method.
path: StringRequest path.
query_string: Option<String>Query string.
headers: HashMap<String, String>Headers.
body: BytesRequest body.
path_parameters: HashMap<String, String>Path parameters (from API Gateway).
stage_variables: HashMap<String, String>Stage variables (from API Gateway).
request_context: RequestContextRequest context.
Implementations§
Source§impl LambdaRequest
impl LambdaRequest
Sourcepub fn from_lambda_request(request: Request) -> Self
pub fn from_lambda_request(request: Request) -> Self
Create from a lambda_http::Request.
Sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Get the content type.
Auto Trait Implementations§
impl !Freeze for LambdaRequest
impl RefUnwindSafe for LambdaRequest
impl Send for LambdaRequest
impl Sync for LambdaRequest
impl Unpin for LambdaRequest
impl UnwindSafe for LambdaRequest
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