From cfb20ef7a898ede29244a4db02d48bde5f37a4aa Mon Sep 17 00:00:00 2001 From: Aaron Gutierrez Date: Fri, 15 Dec 2023 11:48:09 -0800 Subject: [PATCH] fix(Asana Node): Omit body from GET and HEAD requests Avoid unnecessarily including a request body with GET and HEAD requests. Per RFC 7230 clients should not include a body, and we (Asana) are rolling out an infrastructure change that will cause these requests to fail. --- packages/nodes-base/nodes/Asana/GenericFunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Asana/GenericFunctions.ts b/packages/nodes-base/nodes/Asana/GenericFunctions.ts index 05f1150a5e33d..2a04930aefaa6 100644 --- a/packages/nodes-base/nodes/Asana/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Asana/GenericFunctions.ts @@ -27,7 +27,7 @@ export async function asanaApiRequest( const options: IHttpRequestOptions = { headers: {}, method, - body: { data: body }, + body: (method === 'GET' || method === 'HEAD') ? null : { data: body }, qs: query, url: uri || `https://app.asana.com/api/1.0${endpoint}`, json: true,