MCPcopy Index your code
hub / github.com/aws/aws-lambda-rust-runtime / func

Function func

lambda-integration-tests/src/helloworld.rs:16–33  ·  view source on GitHub ↗
(_event: LambdaEvent<ApiGatewayProxyRequest>)

Source from the content-addressed store, hash-verified

14}
15
16async fn func(_event: LambdaEvent<ApiGatewayProxyRequest>) -> Result<ApiGatewayProxyResponse, Error> {
17 let mut headers = HeaderMap::new();
18 headers.insert("content-type", "text/html".parse().unwrap());
19 let resp = {
20 let mut response = ApiGatewayProxyResponse::default();
21 response.status_code = 200;
22 response.multi_value_headers = headers.clone();
23 response.is_base64_encoded = false;
24 response.body = Some("Hello world!".into());
25 response.headers = headers;
26 #[cfg(feature = "catch-all-fields")]
27 {
28 response.other = Default::default();
29 }
30 response
31 };
32 Ok(resp)
33}

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected