# snekfetch

> Just do http requests without all that weird nastiness from other libs

Latest version **4.0.4** (published 2018-06-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.0.4 |
| Published | 2018-06-18 |
| First published | 2017-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/snekfetch) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 111.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 77 |
| Author | Gus Caplan |
| Maintainers | snek |

## Links

- npm: https://www.npmjs.com/package/snekfetch
- Repository: https://github.com/devsnek/snekfetch
- Homepage: https://snekfetch.js.org/
- Issues: https://github.com/devsnek/snekfetch/issues
- npm.io page: https://npm.io/package/snekfetch

## Recent versions

- 4.0.4 (latest) — 2018-06-18
- 4.0.0-beta.1 (next) — 2018-03-15
- 4.0.3 — 2018-06-18
- 4.0.2 — 2018-06-06
- 4.0.1 — 2018-06-05
- 4.0.0 — 2018-04-24
- 4.0.0-beta.0 — 2018-03-01
- 4.0.0-rc.0 — 2018-02-23
- 3.6.4 — 2018-02-03
- 3.6.3 — 2018-01-28
- 3.6.2 — 2018-01-27
- 3.6.1 — 2017-12-06
- 3.6.0 — 2017-12-01
- 3.5.9 — 2017-12-01
- 3.5.8 — 2017-10-28
- … 59 more at https://npm.io/package/snekfetch/versions

## README

[![npm][download-badge]][npm]
[![David][dep-badge]][dep-link]
[![Coverage Status][coverage-badge]][coverage-link]
[![Build Status][build-badge]][build-link]

[![NPM][large-badge]][stats-link]

# snekfetch <sup>[![Version Badge][version-badge]][npm]</sup>

Snekfetch is a fast, efficient, and user-friendly library for making HTTP requests.

It also supports native ALPN negotiation in node for efficient http/2 requests!

The API was inspired by superagent, however it is much smaller and faster.
In fact, in browser, it is a mere 4.0kb.

Documentation is available at https://snekfetch.js.org/

## Some examples

```javascript
const request = require('snekfetch');

request.post('https://httpbin.org/post')
  .send({ usingGoodRequestLibrary: true })
  .then(r => console.log(r.body)); // r.body is object from json response

request.get('https://s.gc.gy/o-SNAKES.jpg')
  .then(r => fs.writeFile('download.jpg', r.body)); // r.body is buffer

request.get('https://s.gc.gy/o-SNAKES.jpg')
  .pipe(fs.createWriteStream('download.jpg')); // pipes
```

Available for browser as UMD from [unpkg][unpkg-link]
```html
<script src="https://unpkg.com/snekfetch"></script>
```

[npm]: https://npmjs.org/package/snekfetch
[large-badge]: https://nodei.co/npm/snekfetch.png?downloads=true&downloadRank=true&stars=true
[stats-link]: https://nodei.co/npm/snekfetch/
[version-badge]: https://versionbadge.now.sh/npm/snekfetch.svg
[download-badge]: https://img.shields.io/npm/dt/snekfetch.svg?maxAge=3600
[build-badge]: https://api.travis-ci.com/devsnek/snekfetch.svg?branch=master
[build-link]: https://travis-ci.com/devsnek/snekfetch
[dep-badge]: https://david-dm.org/devsnek/snekfetch.svg
[dep-link]: https://david-dm.org/devsnek/snekfetch
[coverage-badge]: https://coveralls.io/repos/github/devsnek/snekfetch/badge.svg?branch=master
[coverage-link]: https://coveralls.io/github/devsnek/snekfetch?branch=master
[unpkg-link]: https://unpkg.com/

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