MCPcopy Create free account
hub / github.com/aws/aws-lambda-rust-runtime / bytes_into_response

Function bytes_into_response

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

Source from the content-addressed store, hash-verified

460
461 #[tokio::test]
462 async fn bytes_into_response() {
463 let response = "text".as_bytes().into_response().await;
464 match response.body() {
465 Body::Binary(data) => assert_eq!(data, "text".as_bytes()),
466 _ => panic!("invalid body"),
467 }
468 }
469
470 #[tokio::test]
471 async fn json_with_status_code_into_response() {

Callers

nothing calls this directly

Calls 1

into_responseMethod · 0.45

Tested by

no test coverage detected