Skip to content

Commit

Permalink
use double quotes like the rest of the curl command
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirco Haug committed May 18, 2020
1 parent 90e2074 commit d36b3c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/curlify.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function curl( request ){
}
} else if(!request.get("body") && request.get("method") === "POST") {
curlified.push( "-d" )
curlified.push( "''" )
curlified.push( '""' )
}

return curlified.join( " " )
Expand Down
2 changes: 1 addition & 1 deletion test/mocha/core/curlify.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe("curlify", function() {

let curlified = curl(Im.fromJS(req))

expect(curlified).toEqual("curl -X POST \"http://example.com\" -H \"conTenT Type: application/Moar\" -d ''")
expect(curlified).toEqual("curl -X POST \"http://example.com\" -H \"conTenT Type: application/Moar\" -d \"\"")
})

it("prints a curl statement with an array of query params", function() {
Expand Down

0 comments on commit d36b3c9

Please sign in to comment.