2
0

🐛 (webhook) Fix form encoded request parsing

Was not working when setting `Content-Type` header to `application/x-www-form-urlencoded`
This commit is contained in:
Baptiste Arnaud
2022-12-22 09:38:17 +01:00
parent 25acd04abc
commit 9149af7e6b

View File

@ -140,10 +140,13 @@ export const executeWebhook =
headers,
...basicAuth,
json:
contentType !== 'x-www-form-urlencoded' && body && isJson
!contentType?.includes('x-www-form-urlencoded') && body && isJson
? body
: undefined,
form:
contentType?.includes('x-www-form-urlencoded') && body
? body
: undefined,
form: contentType === 'x-www-form-urlencoded' && body ? body : undefined,
body: body && !isJson ? body : undefined,
}
try {