From 0140de8b95b85a522eed1c6178e46fa17cdc6a36 Mon Sep 17 00:00:00 2001 From: Shichao Zhang Date: Tue, 7 Jan 2025 20:47:58 +0800 Subject: [PATCH] fix(azure-functions): pass body to the context as-is (#2965) --- src/presets/azure/runtime/azure-functions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/presets/azure/runtime/azure-functions.ts b/src/presets/azure/runtime/azure-functions.ts index 1a7ecd7a2e..8a173268ad 100644 --- a/src/presets/azure/runtime/azure-functions.ts +++ b/src/presets/azure/runtime/azure-functions.ts @@ -25,6 +25,6 @@ export async function handle(context: { res: HttpResponse }, req: HttpRequest) { // cookies https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-node?tabs=typescript%2Cwindows%2Cazure-cli&pivots=nodejs-model-v4#http-response cookies: getAzureParsedCookiesFromHeaders(headers), headers: normalizeLambdaOutgoingHeaders(headers, true), - body: body ? body.toString() : statusText, + body: body ?? statusText, }; }