2
0

🐛 Fix form urlencoded content-type webhooks

This commit is contained in:
Baptiste Arnaud
2023-03-13 16:46:53 +01:00
parent 86ecd4aa87
commit bcad99f555

View File

@ -192,10 +192,13 @@ export const executeWebhook =
headers, headers,
...basicAuth, ...basicAuth,
json: 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 ? body
: undefined, : undefined,
form: contentType === 'x-www-form-urlencoded' && body ? body : undefined,
body: body && !isJson ? body : undefined, body: body && !isJson ? body : undefined,
} }
try { try {