Skip to content

Commit 5ec94a3

Browse files
authored
support POST requests with empty body (instead of converting them to GET) (#209)
1 parent aaf1c30 commit 5ec94a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/requestresponseinfo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ class RequestResponseInfo
183183

184184
const reqUrl = this.url;
185185

186-
if (this.postData) {
186+
if (this.method && this.method !== "GET") {
187187
const convData = {
188188
url: this.url,
189189
headers: reqHeaders.headers,
190190
method: this.method,
191-
postData: this.postData,
191+
postData: this.postData || "",
192192
};
193193
if (postToGetUrl(convData)) {
194194
//this.requestBody = convData.requestBody;

0 commit comments

Comments
 (0)