Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
fix: Add -X to curl examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaskarmelkani committed Nov 6, 2017
1 parent 68fa01d commit 7ae1d8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('controllers.requestSample', () => {
'baseUrl': 'https://example.com/'
} ;

let curlStr = 'curl -v GET https://example.com/some/path/ThisIsMerchantId/ThisIsAnOrderId?include=ThisIsInclude \\\n-H "Authorization: Bearer <Access-Token>" \\\n-H "X-Flow-Id: ThisIsXFLOWID" \\\n-F "file: ThisIsInclude" \\\n-F "document-type: ThisIsInclude" \\\n';
let curlStr = 'curl -v -X GET https://example.com/some/path/ThisIsMerchantId/ThisIsAnOrderId?include=ThisIsInclude \\\n-H "Authorization: Bearer <Access-Token>" \\\n-H "X-Flow-Id: ThisIsXFLOWID" \\\n-F "file: ThisIsInclude" \\\n-F "document-type: ThisIsInclude" \\\n';

curlStr += JSON.stringify(requestBody, null, 2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const requestSample = (ctx) => {


// Create CURL string
let curlString = 'curl -v ' + verb + ' ' + baseUrl.replace(/\/$/, '') + path + ' \\\n';
let curlString = 'curl -v -X ' + verb + ' ' + baseUrl.replace(/\/$/, '') + path + ' \\\n';

Object.keys(sample.header).forEach((header) => {
if ('Authorization' === header){
Expand Down

0 comments on commit 7ae1d8e

Please # to comment.