SkillAgentSearch skills...

Nets

nothing but nets. http client that works in node and browsers

Install / Use

/learn @max-mapper/Nets
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

nets

Mac/Linux | Windows ------------ | -------------- Travis | Build status

js-standard-style

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

Uses xhr for browsers and request for node

get

var nets = require("nets")

nets({ url: "http://placekitten.com/g/400/400" }, 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.

post

var nets = require("nets")

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

})

Related Skills

View on GitHub
GitHub Stars101
CategoryDevelopment
Updated2y ago
Forks10

Languages

JavaScript

Security Score

65/100

Audited on Aug 13, 2023

No findings