# http-call

> make http requests

Latest version **5.3.0** (published 2019-12-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install http-call
pnpm add http-call
yarn add http-call
bun add http-call
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.3.0 |
| Published | 2019-12-05 |
| First published | 2017-02-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 6 |
| Unpacked size | 42.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Jeff Dickey @jdxcode |
| Maintainers | dhaulagiri, dickeyxxx, elbandito, rasphilco |
| Keywords | http, request, rest |

## Links

- npm: https://www.npmjs.com/package/http-call
- Repository: https://github.com/heroku/http-call
- Issues: https://github.com/heroku/http-call/issues
- npm.io page: https://npm.io/package/http-call

## Dependencies (6)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [is-stream](https://npm.io/package/is-stream.md) ^2.0.0
- [parse-json](https://npm.io/package/parse-json.md) ^4.0.0
- [content-type](https://npm.io/package/content-type.md) ^1.0.4
- [tunnel-agent](https://npm.io/package/tunnel-agent.md) ^0.6.0
- [is-retry-allowed](https://npm.io/package/is-retry-allowed.md) ^1.1.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 5.3.0 (latest) — 2019-12-05
- 4.0.0-ts2.0 (ts) — 2017-09-14
- 5.2.5 — 2019-07-29
- 5.2.4 — 2019-04-25
- 5.2.3 — 2018-12-06
- 5.2.2 — 2018-08-29
- 5.2.1 — 2018-08-28
- 5.2.0 — 2018-08-17
- 5.1.4 — 2018-05-25
- 5.1.3 — 2018-05-17
- 5.1.2 — 2018-05-06
- 5.1.1 — 2018-04-24
- 5.1.0 — 2018-03-24
- 5.0.2 — 2018-01-25
- 5.0.1 — 2018-01-17
- … 47 more at https://npm.io/package/http-call/versions

## README

http-call
=========

[![Greenkeeper badge](https://badges.greenkeeper.io/heroku/http-call.svg)](https://greenkeeper.io/)

Usage
-----

```js
const {HTTP} = require('http-call')
const {body: user} = await HTTP.get('https://api.github.com/users/me')
// do something with user
// automatically converts from json

// for typescript specify the type of the body with a generic:
const {body: user} = await HTTP.get<{id: string, email: string}>('https://api.github.com/users/me')

// set headers
await HTTP.get('https://api.github.com', {headers: {authorization: 'bearer auth'}})
```

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