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

request-json

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-json - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

20

main.js

@@ -89,8 +89,16 @@ // Generated by CoffeeScript 1.9.0

JsonClient.prototype.setBasicAuth = function(username, password) {
var basicCredentials, credentials;
credentials = username + ":" + password;
basicCredentials = new Buffer(credentials).toString('base64');
return this.headers["authorization"] = "Basic " + basicCredentials;
return this.options.auth = {
user: username,
pass: password
};
};
JsonClient.prototype.setDigestAuth = function(username, password) {
return this.options.auth = {
user: username,
pass: password,
sendImmediately: false
};
};
JsonClient.prototype.setToken = function(token) {

@@ -101,3 +109,5 @@ return this.headers["x-auth-token"] = token;

JsonClient.prototype.setBearerToken = function(token) {
return this.headers["authorization"] = "Bearer " + token;
return this.options.auth = {
bearer: token
};
};

@@ -104,0 +114,0 @@

@@ -15,3 +15,3 @@ {

"license": "MIT",
"version": "0.5.4",
"version": "0.5.5",
"homepage": "https://github.com/mycozycloud/request-json/",

@@ -18,0 +18,0 @@ "bugs": {

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