Socket
Socket
Sign inDemoInstall

eh-api-client

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eh-api-client - npm Package Compare versions

Comparing version 0.8.4 to 0.8.5

6

index.js
var
request = require("request"),
Q = require("q");
Q = require("q"),
_ = require("lodash");

@@ -111,2 +112,5 @@ function buildError(res, data, url) {

}
if(options.headers) {
_.assign(reqParams.headers, options.headers);
}
// _res will store result of http request, for return in callback

@@ -113,0 +117,0 @@ var _res;

3

package.json
{
"name": "eh-api-client",
"version": "0.8.4",
"version": "0.8.5",
"description": "Node.js rest client",

@@ -16,2 +16,3 @@ "main": "index.js",

"dependencies": {
"lodash": "^3.9.3",
"q": "^1.4.1",

@@ -18,0 +19,0 @@ "request": "^2.55.0"

@@ -20,2 +20,16 @@ var

});
it("post with headers", function(done) {
var headers = {
"x-custom-header-1": "1",
"x-custom-header-2": "2"
};
f.post({
test: true,
url: "temp",
headers: headers
}).then(function(res) {
res.headers.should.eql(headers);
}).done(done);
});
});

@@ -26,2 +40,17 @@

it("post with headers", function(done) {
var headers = {
"x-custom-header-1": "1",
"x-custom-header-2": "2"
};
client.post({
test: true,
url: "temp",
headers: headers
}, function(err, res) {
res.headers.should.containDeep(headers);
done();
});
});
it("get notes", function(done) {

@@ -28,0 +57,0 @@ client.get("/notes/", function(err, data) {

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