Skip to content

Commit 96bfdb4

Browse files
committed
Recognize --data-raw curl option (Huachao#790)
1 parent f199ecf commit 96bfdb4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ We add the capability to directly run [curl request](https://curl.haxx.se/) in R
267267
* -I, --head
268268
* -b, --cookie(no cookie jar file support)
269269
* -u, --user(Basic auth support only)
270-
* -d, --data, --data-ascii,--data-binary
270+
* -d, --data, --data-ascii,--data-binary, --data-raw
271271

272272
## Copy Request As cURL
273273
Sometimes you may want to get the curl format of an http request quickly and save it to clipboard, just pressing `F1` and then selecting/typing `Rest Client: Copy Request As cURL` or simply right-click in the editor, and select `Copy Request As cURL`.
@@ -550,7 +550,7 @@ System variables provide a pre-defined set of variables that can be used in any
550550
`appOnly`: Optional. Specify `appOnly` to use make to use a client credentials flow to obtain a token. `aadV2ClientSecret` and `aadV2AppUri`must be provided as REST Client environment variables. `aadV2ClientId` and `aadV2TenantId` may also be optionally provided via the environment. `aadV2ClientId` in environment will only be used for `appOnly` calls.
551551

552552
`scopes:<scope[,]>`: Optional. Comma delimited list of scopes that must have consent to allow the call to be successful. Not applicable for `appOnly` calls.
553-
553+
554554
`tenantId:<domain|tenantId>`: Optional. Domain or tenant id for the tenant to sign in to. (`common` to determine tenant from sign in).
555555

556556
`clientId:<clientid>`: Optional. Identifier of the application registration to use to obtain the token. Default uses an application registration created specifically for this plugin.

‎src/utils/curlRequestParser.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class CurlRequestParser implements RequestParser {
5252
}
5353

5454
// parse body
55-
let body = parsedArguments.d || parsedArguments.data || parsedArguments['data-ascii'] || parsedArguments['data-binary'];
55+
let body = parsedArguments.d || parsedArguments.data || parsedArguments['data-ascii'] || parsedArguments['data-binary'] || parsedArguments['data-raw'];
5656
if (Array.isArray(body)) {
5757
body = body.join('&');
5858
}

0 commit comments

Comments
 (0)