# @josephdaw/http

> A very basic, custom http request wrapper

Latest version **1.0.2** (published 2023-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @josephdaw/http
pnpm add @josephdaw/http
yarn add @josephdaw/http
bun add @josephdaw/http
```

## 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.0.2 |
| Published | 2023-09-05 |
| First published | 2023-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joseph Daw |
| Maintainers | josephdaw |
| Keywords | http, request, node, javascript |

## Links

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

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.4.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

- 1.0.2 (latest) — 2023-09-05
- 1.0.0 — 2023-06-28
- 0.1.0 — 2023-06-28
- 0.0.1 — 2023-06-26

## README

# HTTP wrapper
[![npm (scoped)](https://img.shields.io/npm/v/%40josephdaw/http?logo=npm)](https://www.npmjs.com/package/@josephdaw/http)
![GitHub](https://img.shields.io/github/license/josephdaw/http)
[![Node.js CI](https://github.com/josephdaw/http/actions/workflows/node-testing.yml/badge.svg)](https://github.com/josephdaw/http/actions/workflows/node-testing.yml)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)


## Table of Contents
- [Description](#description)
- [Features](#features)
- [Issues and Requests](#issues-and-requests)
- [Security](#security)
- [Contributing](#contributing)
- [Changes](#changelog)
- [License](#license)


## Description
This is a custom http wrapper. This module is to enable the user to absract away the http calls and focus on the data. 

## Installation
### Using npm
```bash
npm install @josephdaw/http
```

## Usage
### Importing
```javascript
const http = require('@josephdaw/http');
```

### GET
```javascript
http.get(url)
    .then((response) => {
        console.log(response);
    })
    .catch((error) => {
        console.log(error);
    });
```


### POST
```javascript
http.post(url, data)
    .then((response) => {
        console.log(response);
    })
    .catch((error) => {
        console.log(error);
    });
```

### PUT
```javascript
http.put(url, data)
    .then((response) => {
        console.log(response);
    })
    .catch((error) => {
        console.log(error);
    });
```

### DELETE
```javascript
http.delete(url)
    .then((response) => {
        console.log(response);
    })
    .catch((error) => {
        console.log(error);
    });
```

## Issues and Requests
Please report any bugs or feature requests via [GitHub Issues](https://github.com/josephdaw/http/issues). 

## Security 
Please report any security issues to [dev@josephdaw.com](mailto:dev@josephdaw.com). Find more information in our [Security Policy](.github/SECURITY.md)

## Contributing
All development of this project happens through GitHub. We welcome constructive collaboration from the community to help implement new features or fix bugs. For more information please read our [Contribution Guide](.github/CONTRIBUTING.md)

## Changelog
Every significant change is documented in the [changelog file](CHANGELOG.md). 

## License
This project is released under the [MIT License](LICENSE).

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