# nets

> nothin but nets. http client that works in node and browsers

Latest version **3.2.0** (published 2015-10-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install nets
pnpm add nets
yarn add nets
bun add nets
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2015-10-19 |
| First published | 2014-05-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 101 |
| Author | max ogden |
| Maintainers | maxogden, zeke |

## Links

- npm: https://www.npmjs.com/package/nets
- Repository: https://github.com/maxogden/nets
- Issues: https://github.com/maxogden/nets/issues
- npm.io page: https://npm.io/package/nets

## Dependencies (2)

- [xhr](https://npm.io/package/xhr.md) ^2.1.0
- [request](https://npm.io/package/request.md) ^2.65.0

## Recent versions

- 3.2.0 (latest) — 2015-10-19
- 3.1.0 — 2015-03-10
- 3.0.0 — 2015-03-10
- 2.0.0 — 2014-11-25
- 1.0.0 — 2014-05-21

## README

# nets

Mac/Linux | Windows
------------ | --------------
[![Travis](http://img.shields.io/travis/maxogden/nets.svg?style=flat)](https://travis-ci.org/maxogden/nets) | [![Build status](http://ci.appveyor.com/api/projects/status/vo5hdm5sdwaf7ss2)](https://ci.appveyor.com/project/maxogden/nets)

[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)

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

Uses [xhr](https://www.npmjs.org/package/xhr) for browsers and [request](https://www.npmjs.org/package/request) for node

#### get

```js
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 [`Buffer`](http://nodejs.org/api/buffer.html)s by default, in both node and in browsers. You can pass `{encoding: undefined}` to turn this off.

#### post

```js
var nets = require("nets")

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

})
```

---
_Source: https://npm.io/package/nets · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
