Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edgegrid

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edgegrid - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "edgegrid",
"version": "1.1.1",
"version": "1.1.2",
"description": "Authorisation process and API helper for Akamai OPEN APIs",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -113,4 +113,18 @@ // Node modules

// headers are case-insensitive so this function returns the value of a header
// no matter what its case is. Returns undefined if there's no header defined.
request.getHeader = function(header) {
var result = undefined;
for (k in this.headers) {
if (k.toLowerCase() === header) {
result = this.headers[k];
break;
}
}
return result;
}
if (request.method == "POST" || request.method == "PUT") {
request.headers["content-type"] = 'application/x-www-form-urlencoded';
// Accept user-defined, case-insensitive content-type header -- or use default type
request.headers['content-type'] = request.getHeader('content-type') || 'application/x-www-form-urlencoded';
request.headers['content-length'] = request.body.length;

@@ -117,0 +131,0 @@ }

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