Skip to content

Commit

Permalink
fix(Asana Node): Omit body from GET and HEAD requests
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, and we (Asana) are
rolling out an infrastructure change that will cause these requests to
fail.
  • Loading branch information
aarongut committed Dec 15, 2023
1 parent 2689c37 commit cfb20ef
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') ? null : { data: body },

Check failure on line 30 in packages/nodes-base/nodes/Asana/GenericFunctions.ts

View workflow job for this annotation

GitHub Actions / Lint changes

Replace `(method·===·'GET'·||·method·===·'HEAD')` with `method·===·'GET'·||·method·===·'HEAD'`
qs: query,
url: uri || `https://app.asana.com/api/1.0${endpoint}`,
json: true,
Expand Down

0 comments on commit cfb20ef

Please sign in to comment.