# custom-http-wrapper

> CustomHTTP is a lightweight HTTP client library for making HTTP requests in JavaScript using XMLHttpRequest.

Latest version **1.0.0** (published 2023-09-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install custom-http-wrapper
pnpm add custom-http-wrapper
yarn add custom-http-wrapper
bun add custom-http-wrapper
```

## 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.0 |
| Published | 2023-09-27 |
| First published | 2023-09-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | checkster |

## Links

- npm: https://www.npmjs.com/package/custom-http-wrapper
- npm.io page: https://npm.io/package/custom-http-wrapper

## Dependencies (4)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.23.1
- [copy-webpack-plugin](https://npm.io/package/copy-webpack-plugin.md) ^11.0.0
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^5.5.3
- [clean-webpack-plugin](https://npm.io/package/clean-webpack-plugin.md) ^4.0.0

## Recent versions

- 1.0.0 (latest) — 2023-09-27

## README

# CustomHTTP

CustomHTTP is a lightweight HTTP client library for making HTTP requests in JavaScript using XMLHttpRequest.

## Installation

You can install the library using npm:

```bash
npm install custom-http
```
## Usage
### Importing
```javascript
import { CustomHTTP } from 'custom-http';
import { HttpMethod } from 'custom-http/constants/httpMethods';
```
### Creating an instance
```javascript
const http = new CustomHTTP();
```
## Examples
### Making a GET request
```javascript
customHTTP.get('https://jsonplaceholder.typicode.com/posts/1') // Первый запрос
    .then((response) => {
        console.log('GET Response:', response);
    })
    .catch((error) => {
        console.error('GET Error:', error);
    });
```
### Making a Patch request
```javascript
customHTTP.patch('https://jsonplaceholder.typicode.com/posts/1', {
title: 'title',
body: 'body'
}) // Первый запрос
.then((response) => {
console.log('PATCH Response:', response);
})
.catch((error) => {
console.error('PATCH Error:', error);
});
```

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