Skip to content

Commit d8528c2

Browse files
committed
Fix request parse error for curl request without body #1026
1 parent c887bf8 commit d8528c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/curlRequestParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class CurlRequestParser implements RequestParser {
5555
let body = parsedArguments.d || parsedArguments.data || parsedArguments['data-ascii'] || parsedArguments['data-binary'] || parsedArguments['data-raw'];
5656
if (Array.isArray(body)) {
5757
body = body.join('&');
58-
} else {
58+
} else if (body !== undefined) {
5959
body = body.toString();
6060
}
6161

0 commit comments

Comments
 (0)