mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Asana Node): Omit body from GET, HEAD, and DELETE requests (#8057)
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.
This commit is contained in:
@@ -27,7 +27,7 @@ export async function asanaApiRequest(
|
|||||||
const options: IHttpRequestOptions = {
|
const options: IHttpRequestOptions = {
|
||||||
headers: {},
|
headers: {},
|
||||||
method,
|
method,
|
||||||
body: { data: body },
|
body: method === 'GET' || method === 'HEAD' || method === 'DELETE' ? null : { data: body },
|
||||||
qs: query,
|
qs: query,
|
||||||
url: uri || `https://app.asana.com/api/1.0${endpoint}`,
|
url: uri || `https://app.asana.com/api/1.0${endpoint}`,
|
||||||
json: true,
|
json: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user