Skip to content

Commit

Permalink
Send as json instead of application/x-www-form-urlencoded
Browse files Browse the repository at this point in the history
  • Loading branch information
mjcuva committed Jan 22, 2018
1 parent 9a04b29 commit 533f8b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports.run = function(config, info) {
token: info.opts.token,
swagger: JSON.stringify(info.swagger),
};
request.post(`${config.host.url}/cli/swagger`, { json: true, form: form }, function(a, b, data) {
request.post(`${config.host.url}/cli/swagger`, { json: form }, function(a, b, data) {
if (data.success) {
console.log("");
console.log("Success! ".green);
Expand All @@ -23,7 +23,7 @@ exports.run = function(config, info) {
console.log("You can also use .yaml to get the YAML representation.".grey);
*/
} else {
console.log(data)
console.log(data)
console.error("There was an error uploading!".red);
}

Expand Down

0 comments on commit 533f8b8

Please sign in to comment.