lambda-apigateway-response   ![Crates Badge] ![Docs Badge] ![License: Apache] ![License: MIT]

A response object for aws-lambda-rust-runtime, when the lambda function integrated into API Gateway.

Example

```rust use lambdaapigatewayresponse::{ http::StatusCode, types::{ Headers, MultiValueHeaders, }, Response, }; use lambdaruntime::{ Error as LambdaError, LambdaEvent, }; use serdejson::json;

type LambdaResult = Result;

async fn handler( event: LambdaEvent, ) -> LambdaResult> { let res = Response { statuscode: StatusCode::OK, body: json!({ "message": "Hello world!", }), headers: Headers::new(), multivalueheaders: MultiValueHeaders::new(), isbase64encoded: true, };

Ok(res)

}

[tokio::main]

async fn main() -> LambdaResult<()> { let handlerfn = lambdaruntime::servicefn(handler); lambdaruntime::run(handler_fn).await?;

Ok(())

} ```