Skip to content

Commit 2aadcec

Browse files
authored
Merge pull request #1 from alpha-group/chore/fix-put-request-curl-snippet
PUT request flag for shell curl
2 parents a5f572d + 8a3aa2e commit 2aadcec

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

dist/targets/shell/curl/client.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,16 @@ exports.curl = {
169169
else {
170170
push("".concat(binary ? '--data-binary' : arg('data'), " ").concat((0, shell_1.quote)(postData.text)));
171171
}
172+
173+
if (method === 'PUT') {
174+
push("".concat("-X", " PUT"));
175+
}
172176
break;
173177
default: {
174178
// raw request body
175179
if (!postData.text) {
176-
if (method === 'POST') {
177-
push("".concat("-X", " POST"));
180+
if (['POST', 'PUT'].includes(method)) {
181+
push("".concat("-X", ` ${method}`));
178182
}
179183
break;
180184
}

0 commit comments

Comments
 (0)