Deserializes a `Request` from a string of JSON text. # Example ```rust,no_run use lambda_http::request::from_str; use std::fs::File; use std::error::Error; fn main() -> Result<(), Box > { let request = from_str( r#"{ ...raw json here... }"# )?; Ok(println!("{:#?}", request)) } ```
(s: &str)
| 526 | /// } |
| 527 | /// ``` |
| 528 | pub fn from_str(s: &str) -> Result<crate::Request, JsonError> { |
| 529 | serde_json::from_str(s).map(LambdaRequest::into) |
| 530 | } |
| 531 | |
| 532 | fn x_forwarded_proto() -> HeaderName { |
| 533 | HeaderName::from_static("x-forwarded-proto") |
no outgoing calls