Function lambda_http::request::from_str

source ·
pub fn from_str(s: &str) -> Result<Request, JsonError>
Expand description

Deserializes a Request from a string of JSON text.

Example

use lambda_http::request::from_str;
use std::fs::File;
use std::error::Error;

fn main() -> Result<(), Box<dyn Error>> {
    let request = from_str(
        r#"{ ...raw json here... }"#
    )?;
    Ok(println!("{:#?}", request))
}