Mac/Linux | Windows | Browsers |
---|---|---|
nothin but nets. http client that works in node and browsers
uses xhr for browsers and request for node
var nets = require("nets")
nets({
body: '{"foo": "bar"}',
url: "/foo",
method: "POST",
headers: {
"Content-Type": "application/json"
}
}, function (err, resp, body) {
})