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

restl

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restl - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

6

changelog.md
ChangeLog
=========
0.3.1 (2017-04-26)
------------------
* #31: Support for setting a standard `Content-Type` HTTP header.
0.3.0 (2017-04-24)

@@ -5,0 +11,0 @@ ------------------

@@ -19,2 +19,7 @@ var url = require('url');

}
if (options.contentType) {
this.contentType = options.contentType;
} else {
this.contentType = 'application/hal+json';
}

@@ -121,2 +126,5 @@ if (options.auth) {

}
if (!request.headers.has('Content-Type')) {
request.headers.set('Content-Type', this.contentType);
}
if (!request.headers.has('Authorization') && this.auth) {

@@ -123,0 +131,0 @@ switch(this.auth.type) {

2

package.json
{
"name": "restl",
"version": "0.3.0",
"version": "0.3.1",
"description": "Opiniated HAL client.",

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

@@ -137,2 +137,4 @@ Restl - A hypermedia client for nodejs

format as the HTTP header.
* `contentType` the default contentType the client sends over. By default
this is `application/hal+json`.

@@ -139,0 +141,0 @@

@@ -28,2 +28,3 @@ const Client = require('../../lib/client');

expect(result['accept']).to.eql('application/hal+json, application/json');
expect(result['content-type']).to.eql('application/hal+json');

@@ -30,0 +31,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