From 5ec94a3e35561b8be9cc06b27dca6ff30023d690 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Wed, 10 Apr 2024 23:52:44 -0700 Subject: [PATCH] support POST requests with empty body (instead of converting them to GET) (#209) --- src/requestresponseinfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/requestresponseinfo.js b/src/requestresponseinfo.js index ff341334..309e20c5 100644 --- a/src/requestresponseinfo.js +++ b/src/requestresponseinfo.js @@ -183,12 +183,12 @@ class RequestResponseInfo const reqUrl = this.url; - if (this.postData) { + if (this.method && this.method !== "GET") { const convData = { url: this.url, headers: reqHeaders.headers, method: this.method, - postData: this.postData, + postData: this.postData || "", }; if (postToGetUrl(convData)) { //this.requestBody = convData.requestBody;