postman-collection
Advanced tools
@@ -53,2 +53,20 @@ var util = require('../util'), | ||
| this.update(options); | ||
| }), PropertyBase); | ||
| _.extend(Header.prototype, /** @lends Header.prototype */ { | ||
| /** | ||
| * Converts the header to a single header string | ||
| * @returns {String} | ||
| */ | ||
| toString: function () { | ||
| return this.key + ': ' + this.value; | ||
| }, | ||
| /** | ||
| * Assigns the given properties to the Header | ||
| * | ||
| * @param options | ||
| */ | ||
| update: function (options) { | ||
| /** | ||
@@ -70,11 +88,9 @@ * The header Key | ||
| _.has(options, 'system') && (this.system = options.system); | ||
| }), PropertyBase); | ||
| _.extend(Header.prototype, /** @lends Header.prototype */ { | ||
| /** | ||
| * Converts the header to a single header string | ||
| * @returns {String} | ||
| */ | ||
| toString: function () { | ||
| return this.key + ': ' + this.value; | ||
| /** | ||
| * Indicates whether the header should be . | ||
| * @type {*|boolean} | ||
| * @todo figure out whether this should be in property.js | ||
| */ | ||
| _.has(options, 'disabled') && (this.disabled = options.disabled); | ||
| } | ||
@@ -81,0 +97,0 @@ }); |
@@ -61,3 +61,3 @@ var _ = require('../../util').lodash, | ||
| body: request.body ? request.body.toString() : undefined, | ||
| headers: _.transform(request.getHeaders(), function (accumulator, value, key) { | ||
| headers: _.transform(request.getHeaders({ enabled: true }), function (accumulator, value, key) { | ||
| if (!_.contains(NON_SIGNABLE_HEADERS, key.toLowerCase())) { | ||
@@ -64,0 +64,0 @@ accumulator[key] = value; |
@@ -68,4 +68,5 @@ var _ = require('../util').lodash, | ||
| * | ||
| * @param options | ||
| * @param options {Object=} | ||
| * @param options.ignoreCase {Boolean} When set to "true", will ensure that all the header keys are lower case. | ||
| * @param options.enabled {Boolean} Only get the enabled headers | ||
| * | ||
@@ -82,2 +83,3 @@ * @note If multiple headers are present in the same collection with same name, but different case | ||
| _.forEach(self.headers.all(), function (header) { | ||
| if (options.enabled && header.disabled) { return; } | ||
| headers[options.ignoreCase ? header.key.toLowerCase() : header.key] = header.value; | ||
@@ -84,0 +86,0 @@ }); |
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "author": "Postman Labs <help@getpostman.com>", | ||
| "version": "0.4.10", | ||
| "version": "0.4.11", | ||
| "keywords": [ | ||
@@ -8,0 +8,0 @@ "postman" |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
279271
0.21%6334
0.25%