From 42c2a8730de1d971109f9db06d7109213ab9c4f4 Mon Sep 17 00:00:00 2001 From: Ismael Gonzalez Date: Wed, 26 Jun 2024 11:35:07 -0700 Subject: [PATCH] Update client.ts content type header for postForm Updating content-type header in postForm client call to resolve issue where webhook urls are being encoded causing jotform api to fail with 400 bad request due to bad webhook url caused by url encoding. --- lib/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.ts b/lib/client.ts index 561f7ab..5f8032e 100644 --- a/lib/client.ts +++ b/lib/client.ts @@ -52,7 +52,7 @@ export default class Client { postForm(url: string, body?: Json, config?: RequestConfig): JotformResponse { return this.inner.post(url, body, {...config, headers: { ...config?.headers, - 'Content-Type': 'application/x-www-form-urlencoded', + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', }}); }