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

Function content_headers_unset

lambda-http/src/response.rs:591–605  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

589
590 #[tokio::test]
591 async fn content_headers_unset() {
592 // Drive the implementation by using `hyper::Body` instead of
593 // of `aws_lambda_events::encodings::Body`
594 let response = Response::builder()
595 .body(HyperBody::from("000000".as_bytes()))
596 .expect("unable to build http::Response");
597 let response = response.into_response().await;
598 let response = LambdaResponse::from_response(&RequestOrigin::ApiGatewayV2, response);
599
600 let json = serde_json::to_string(&response).expect("failed to serialize to json");
601 assert_eq!(
602 json,
603 r#"{"statusCode":200,"headers":{},"multiValueHeaders":{},"body":"000000","isBase64Encoded":false,"cookies":[]}"#
604 )
605 }
606
607 #[test]
608 #[cfg(feature = "vpc_lattice")]

Callers

nothing calls this directly

Calls 1

into_responseMethod · 0.45

Tested by

no test coverage detected