We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25eb6e1 commit 3617120Copy full SHA for 3617120
Examples/APIGateway/Sources/main.swift
@@ -31,10 +31,7 @@ let runtime = LambdaRuntime {
31
header["content-type"] = "application/json"
32
33
// echo the request in the response
34
- let data = try encoder.encode(event)
35
- let response = String(decoding: data, as: Unicode.UTF8.self)
36
-
37
- return APIGatewayV2Response(statusCode: .ok, headers: header, body: response)
+ return try APIGatewayV2Response(statusCode: .ok, headers: header, encodableBody: event)
38
}
39
40
try await runtime.run()
0 commit comments