From c0d512f5872ab463b684620a4869896bea687d04 Mon Sep 17 00:00:00 2001 From: Gabriel Garrett Date: Sun, 4 Aug 2024 11:34:22 -0500 Subject: [PATCH] Fixes missing body when Content-Type header supplied by developer --- src/FunctionsClient.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/FunctionsClient.ts b/src/FunctionsClient.ts index ed1849f..a84cb08 100644 --- a/src/FunctionsClient.ts +++ b/src/FunctionsClient.ts @@ -86,6 +86,9 @@ export class FunctionsClient { _headers['Content-Type'] = 'application/json' body = JSON.stringify(functionArgs) } + } else { + // if the Content-Type was supplied, simply set the body + body = functionArgs; } const response = await this.fetch(`${this.url}/${functionName}`, {