2
0

🐛 (http) Accept body content other than json and form-data

This commit is contained in:
Baptiste Arnaud
2024-07-11 10:46:00 +02:00
parent 1bc217d3ad
commit c5794a0461

View File

@ -203,7 +203,7 @@ export const executeWebhook = async (
headers: headers ?? {}, headers: headers ?? {},
...(basicAuth ?? {}), ...(basicAuth ?? {}),
json: !isFormData && body && isJson ? body : undefined, json: !isFormData && body && isJson ? body : undefined,
body: (isFormData && body ? body : undefined) as any, body: body && (isFormData || !isJson) ? body : undefined,
timeout: isNotDefined(env.CHAT_API_TIMEOUT) timeout: isNotDefined(env.CHAT_API_TIMEOUT)
? false ? false
: params.timeout && params.timeout !== defaultTimeout : params.timeout && params.timeout !== defaultTimeout