We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efd4ea9 commit 946f094Copy full SHA for 946f094
src/run.js
@@ -77,7 +77,12 @@ function buildOpts(body, cliOpts) {
77
if (isJsonString(cliOpts.headers)) {
78
opts.body = body
79
} else {
80
- opts.body = JSON.stringify(loadJsonOrYaml(body))
+ const bodyObj = loadJsonOrYaml(body)
81
+ const sortedBodyObj = Object.keys(bodyObj).sort().reduce((ret, key) => {
82
+ ret[key] = bodyObj[key];
83
+ return ret;
84
+ }, {});
85
+ opts.body = JSON.stringify(sortedBodyObj)
86
}
87
88
if (cliOpts?.debug) {
0 commit comments