Skip to content

Commit c84c309

Browse files
authored
ENGG-5319 : Fix form-urlencoded body handling for GET requests (requestly#295)
* Fix form data handling for GET requests with urlencoded content type * Send form data for all methods with x-www-form-urlencoded
1 parent 301a1ee commit c84c309

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/actions/makeApiClientRequest.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ const makeApiClientRequest = async ({ apiRequest }) => {
2323
headers[key] = value;
2424
});
2525

26-
if (
27-
!["GET", "HEAD"].includes(method) &&
28-
apiRequest.contentType === "application/x-www-form-urlencoded"
29-
) {
26+
if (apiRequest.contentType === "application/x-www-form-urlencoded") {
3027
const formData = new FormData();
3128
body?.forEach(({ key, value }) => {
3229
formData.append(key, value);

0 commit comments

Comments
 (0)