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

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.5 to 0.8.6

7

index.js

@@ -81,3 +81,3 @@ var

};
if(body) {
if(body && !body._read) {
reqParams.body = body;

@@ -130,3 +130,3 @@ }

}
request(reqParams, function(err, res, data) {
var req = request(reqParams, function(err, res, data) {
_res = res;

@@ -141,2 +141,5 @@ if(err) {

});
if(body && body._read) {
body.pipe(req);
}
return deferred.promise;

@@ -143,0 +146,0 @@ };

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

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

var
Factory = require("../index"),
should = require("should"),
ehGuid = require("eh-guid");
ehGuid = require("eh-guid"),
fs = require("fs");

@@ -10,4 +11,4 @@ var f = new Factory("http://localhost:3000");

describe("Test factory methods", function(done) {
it("get", function() {
describe("Test factory methods", function() {
it("get", function(done) {
f.get({

@@ -19,2 +20,13 @@ test: true,

done();
}).done();
});
it("send readable stream", function(done) {
var stream = fs.createReadStream(__filename);
f.post({
test: true,
url: "test"
}, stream, function(err, res) {
should.not.exists(res.body);
done();
});

@@ -34,3 +46,4 @@ });

res.headers.should.eql(headers);
}).done(done);
done();
}).done();
});

@@ -57,3 +70,3 @@ });

it("get notes", function(done) {
it("get notes list", function(done) {
client.get("/notes/", function(err, data) {

@@ -91,3 +104,3 @@ should.not.exists(err);

done();
});
}).done();
});

@@ -94,0 +107,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