From a93e10e3e6ad407461df2c7c59b4bf6e7bf245d5 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Thu, 19 Feb 2026 11:27:19 +0530 Subject: [PATCH 1/2] Fix form data handling for GET requests with urlencoded content type --- src/main/actions/makeApiClientRequest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/actions/makeApiClientRequest.js b/src/main/actions/makeApiClientRequest.js index d5518cd1..756a2af0 100644 --- a/src/main/actions/makeApiClientRequest.js +++ b/src/main/actions/makeApiClientRequest.js @@ -24,7 +24,7 @@ const makeApiClientRequest = async ({ apiRequest }) => { }); if ( - !["GET", "HEAD"].includes(method) && + method !== "HEAD" && apiRequest.contentType === "application/x-www-form-urlencoded" ) { const formData = new FormData(); From de137616f0cd1faa003069689e9631c2cc349f24 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 25 Feb 2026 17:37:47 +0530 Subject: [PATCH 2/2] Send form data for all methods with x-www-form-urlencoded --- src/main/actions/makeApiClientRequest.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/actions/makeApiClientRequest.js b/src/main/actions/makeApiClientRequest.js index 756a2af0..df26c7b5 100644 --- a/src/main/actions/makeApiClientRequest.js +++ b/src/main/actions/makeApiClientRequest.js @@ -23,10 +23,7 @@ const makeApiClientRequest = async ({ apiRequest }) => { headers[key] = value; }); - if ( - method !== "HEAD" && - apiRequest.contentType === "application/x-www-form-urlencoded" - ) { + if (apiRequest.contentType === "application/x-www-form-urlencoded") { const formData = new FormData(); body?.forEach(({ key, value }) => { formData.append(key, value);