From 241d721664ac62ee0e5896e6e01d5e0867e8c1a0 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Tue, 6 Feb 2024 12:59:20 -0800 Subject: [PATCH] support POST requests with empty body (instead of converting them to GET) --- 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;