nothing but nets. http client that works in node and browsers
Latest commit 2e2050a Oct 19, 2015 @zeke zeke Bump request and xhr versions
Failed to load latest commit information.
.gitignore 1.0.0 May 21, 2014
.travis.yml update ci May 21, 2014
appveyor.yml fix readme May 21, 2014 add collaborator Mar 10, 2015
index.js add patches from rexxars Mar 10, 2015
package.json Bump request and xhr versions Oct 19, 2015 use standard style Mar 10, 2015
test.js add patches from rexxars Mar 10, 2015


Mac/Linux Windows
Travis Build status


Nothin but nets. HTTP client that works the same in node and browsers

Uses xhr for browsers and request for node


var nets = require("nets")

nets({ url: "" }, function(err, resp, body) {
  // body is a Buffer containing the image

Note that nets returns data as Buffers by default, in both node and in browsers. You can pass {encoding: undefined} to turn this off.


var nets = require("nets")

  body: '{"foo": "bar"}',
  url: "/foo",
  method: "POST",
  headers: {
    "Content-Type": "application/json"
}, function done (err, resp, body) {