File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ export const curl: Client<CurlOptions> = {
139
139
const encoded = encodeURIComponent ( param . name ) ;
140
140
const needsEncoding = encoded !== unencoded ;
141
141
const name = needsEncoding ? encoded : unencoded ;
142
- const flag = binary ? '--data-binary' : `--data ${ needsEncoding ? '-urlencode' : '' } ` ;
142
+ const flag = binary ? '--data-binary' : needsEncoding ? '--data- urlencode' : arg ( 'data' ) ;
143
143
push ( `${ flag } ${ quote ( `${ name } =${ param . value } ` ) } ` ) ;
144
144
} ) ;
145
145
} else {
Original file line number Diff line number Diff line change 1
- curl -X POST ' https://httpbin.org/anything?foo=bar&foo=baz&baz=abc&key=value' -H ' accept: application/json' -H ' content-type: application/x-www-form-urlencoded' -b ' foo=bar; bar=baz' --data foo=bar
1
+ curl -X POST ' https://httpbin.org/anything?foo=bar&foo=baz&baz=abc&key=value' -H ' accept: application/json' -H ' content-type: application/x-www-form-urlencoded' -b ' foo=bar; bar=baz' -d foo=bar
You can’t perform that action at this time.
0 commit comments