Skip to content

Commit b830746

Browse files
committed
Fix curl prase error if -d option is number only #957
1 parent 7b83d7b commit b830746

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils/curlRequestParser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ 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 {
59+
body = body.toString();
5860
}
5961

6062
if (typeof body === 'string' && body[0] === '@') {

0 commit comments

Comments
 (0)