Skip to content

Commit

Permalink
fix(Asana Node): Omit body from GET, HEAD, and DELETE requests (#8057)
Browse files Browse the repository at this point in the history
Avoid unnecessarily including a request body with GET and HEAD requests.
Per RFC 7230 clients should not include a body for these requests, and
we (Asana) are rolling out an infrastructure change that will cause
these requests to fail.
  • Loading branch information
aarongut authored and ivov committed Dec 27, 2023
1 parent fb439d2 commit fc2f528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Asana/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function asanaApiRequest(
const options: IHttpRequestOptions = {
headers: {},
method,
body: { data: body },
body: method === 'GET' || method === 'HEAD' || method === 'DELETE' ? null : { data: body },
qs: query,
url: uri || `https://app.asana.com/api/1.0${endpoint}`,
json: true,
Expand Down

0 comments on commit fc2f528

Please sign in to comment.