postman-code-generators
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -73,2 +73,6 @@ let _ = require('./lodash'); | ||
function getHost (request) { | ||
if (!request.url.host) { | ||
return ''; | ||
} | ||
let host = _.join(request.url.host, '.'); | ||
@@ -75,0 +79,0 @@ if (request.url.port) { |
@@ -119,3 +119,3 @@ const _ = require('./lodash'), | ||
function parseHost (request, indentString) { | ||
var hostArray = _.get(request, 'url.host'), | ||
var hostArray = _.get(request, 'url.host', []), | ||
hostSnippet = indentString + '\'hostname\': \''; | ||
@@ -127,5 +127,7 @@ | ||
return accumalator; | ||
}, []).join('.') + '\''; | ||
}, []).join('.'); | ||
} | ||
hostSnippet += '\''; | ||
return hostSnippet; | ||
@@ -132,0 +134,0 @@ } |
@@ -53,4 +53,4 @@ const _ = require('./lodash'), | ||
if (options.followRedirect) { | ||
optionsArray.push(indentString + '\'maxRedirects\': 21 // sets the maximum number of allowed ' + | ||
'redirect; default 21'); | ||
optionsArray.push(indentString + '\'maxRedirects\': 20 // sets the maximum number of allowed ' + | ||
'redirect; default 20'); | ||
} | ||
@@ -57,0 +57,0 @@ |
{ | ||
"name": "postman-code-generators", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Generates code snippets for a postman collection", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,3 +5,3 @@ | ||
# postman-code-generators | ||
Common codegen repo for postman app | ||
Common codegen repo for the Postman app | ||
@@ -14,6 +14,6 @@ ## Getting Started | ||
#### Prerequisites | ||
To run any of the Code-Gen, ensure that you have NodeJS >= v8. A copy of the NodeJS installable can be downloaded from https://nodejs.org/en/download/package-manager. | ||
To run any of the code-generators, ensure that you have NodeJS >= v8. A copy of the NodeJS installable can be downloaded from https://nodejs.org/en/download/package-manager. | ||
#### Usage | ||
* Remove .git folder from each codegen. | ||
* Remove the `.git` folder from each codegen. | ||
* Place individual codegen inside `codegens` folder. | ||
@@ -20,0 +20,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
978895
278
18562