# @luckbox/http-adapter-factory

> Easy to use http adapter factory with support for GET, POST, DELETE, PATCH and PUT

Latest version **1.4.0** (published 2023-07-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @luckbox/http-adapter-factory
pnpm add @luckbox/http-adapter-factory
yarn add @luckbox/http-adapter-factory
bun add @luckbox/http-adapter-factory
```

## 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 | 1.4.0 |
| Published | 2023-07-17 |
| First published | 2021-01-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.14 |
| Dependencies | 2 |
| Unpacked size | 93.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Luckbox |
| Maintainers | ttecss, zupper |

## Links

- npm: https://www.npmjs.com/package/@luckbox/http-adapter-factory
- Repository: https://github.com/LuckboxGG/http-adapter-factory
- Homepage: https://github.com/LuckboxGG/http-adapter-factory#readme
- Issues: https://github.com/LuckboxGG/http-adapter-factory/issues
- npm.io page: https://npm.io/package/@luckbox/http-adapter-factory

## Dependencies (2)

- [qs](https://npm.io/package/qs.md) ^6.9.4
- [got](https://npm.io/package/got.md) ^11.8.1

## Recent versions

- 1.4.0 (latest) — 2023-07-17
- 1.3.1 — 2022-11-14
- 1.3.0 — 2022-11-14
- 1.2.0 — 2022-03-10
- 1.1.0 — 2021-04-20
- 1.0.2 — 2021-01-21
- 1.0.1 — 2021-01-19
- 1.0.0 — 2021-01-13

## README

[![Build Status](https://travis-ci.org/LuckboxGG/http-adapter-factory.svg?branch=main)](https://travis-ci.org/LuckboxGG/http-adapter-factory)

[![Coverage Status](https://coveralls.io/repos/github/LuckboxGG/http-adapter-factory/badge.svg?branch=main)](https://coveralls.io/github/LuckboxGG/http-adapter-factory?branch=main)

# Http Adapter Factory

A factory producing http adapters with different(in the near future) underlying library implementations.

### Usage

```
import HttpAdapterFactory from '@luckbox/http-adapter-factory';

const httpAdapterFactory = new HttpAdapterFactory();
const httpAdapter = httpAdapterFactory.create({
  timeout: 10000
});

/* ... */
await httpAdapter.get('http://example.com', { bar: 'foo '});
await httpAdapter.post('http://example.com', {
  email: 'user@exampke.com',
  password: '123456'
});
await httpAdapter.delete('http://example.com/123');
await httpAdapter.patch('http://example.com/123', {
  bar: 'user@exampke.com',
});
await httpAdapter.put('http://example.com/123', {
  bar: 'user@exampke.com',
});
```

## Supported implementations:

Currently, only one request library is supported - [got](https://github.com/sindresorhus/got#readme)

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