Socket
Socket
Sign inDemoInstall

postman-collection

Package Overview
Dependencies
Maintainers
3
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-collection - npm Package Compare versions

Comparing version 0.4.10 to 0.4.11

32

lib/collection/header.js

@@ -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 @@ });

@@ -5,3 +5,3 @@ {

"author": "Postman Labs <help@getpostman.com>",
"version": "0.4.10",
"version": "0.4.11",
"keywords": [

@@ -8,0 +8,0 @@ "postman"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc