From d36b3c9fefa821e9c2eb59d33f82a0b538e10fa2 Mon Sep 17 00:00:00 2001 From: Mirco Haug Date: Mon, 18 May 2020 13:39:23 +0200 Subject: [PATCH] use double quotes like the rest of the curl command --- src/core/curlify.js | 2 +- test/mocha/core/curlify.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/curlify.js b/src/core/curlify.js index 2491b7f4179d..f8ecf29155eb 100644 --- a/src/core/curlify.js +++ b/src/core/curlify.js @@ -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( " " ) diff --git a/test/mocha/core/curlify.js b/test/mocha/core/curlify.js index 890ff3906bdd..227da8547a83 100644 --- a/test/mocha/core/curlify.js +++ b/test/mocha/core/curlify.js @@ -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() {