Skip to content
Myr

refactor(lambda): aws lambda createResult method (#2038)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Aris Kemper · committed by GitHub · parent cce2b3c · Browse files · 1 file+2 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−7 removed

  • other:+2 added−7 removed

1 file+2 added−7 removed

modified:src/adapter/aws-lambda/handler.ts+2 added-7 removed
172 unmodified lines
173 const contentEncoding = res.headers.get('content-encoding')174 isBase64Encoded = isContentEncodingBinary(contentEncoding)175 }176177 let body: string178 if (isBase64Encoded) {179 const buffer = await res.arrayBuffer()180 body = encodeBase64(buffer)181 } else {182 body = await res.text()183 }177 const body = isBase64Encoded ? encodeBase64(await res.arrayBuffer()) : await res.text()178179 const result: APIGatewayProxyResult = {180 body: body,181 headers: {},182 statusCode: res.status,
87 unmodified lines