Socket
Socket
Sign inDemoInstall

eh-api-client

Package Overview
Dependencies
47
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.5.0

10

index.js

@@ -44,3 +44,4 @@ var

json: true,
qs: {}
qs: {},
headers: {}
};

@@ -51,6 +52,6 @@ if(body) {

if(this.lockUUID) {
reqParams.headers = {Authorization: "Lock " + this.lockUUID};
reqParams.headers.Authorization = "Lock " + this.lockUUID;
}
if(this.internalAuth) {
reqParams.headers = {Authorization: "Internal " + this.internalAuth};
reqParams.headers.Authorization = "Internal " + this.internalAuth;
}

@@ -76,2 +77,5 @@ if(options.filter) {

}
if(options.range) {
reqParams.headers.Range = options.range;
}
if(options.test) {

@@ -78,0 +82,0 @@ return cb(null, reqParams);

{
"name": "eh-api-client",
"version": "0.4.0",
"version": "0.5.0",
"description": "Node.js rest client",

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

@@ -9,3 +9,3 @@ var

describe("Client test", function() {
describe("Internal Auth Client test", function() {
var noteGlobalId = ehGuid.gen();

@@ -62,2 +62,14 @@

});
it("should make a range request", function(done) {
client.get({
url: "test",
range: "items 0-4",
test: true
}, function(err, req) {
should.not.exists(err);
req.headers.Range.should.equal("items 0-4");
done();
});
});
});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc