# free-http-client

> Module Http client for nodejs

Latest version **1.0.1** (published 2022-09-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install free-http-client
pnpm add free-http-client
yarn add free-http-client
bun add free-http-client
```

## 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.1 |
| Published | 2022-09-02 |
| First published | 2022-09-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | papesambandour |

## Links

- npm: https://www.npmjs.com/package/free-http-client
- npm.io page: https://npm.io/package/free-http-client

## Dependencies (2)

- [node-libcurl](https://npm.io/package/node-libcurl.md) ^2.3.4
- [query-string](https://npm.io/package/query-string.md) ^7.1.1

## Recent versions

- 1.0.1 (latest) — 2022-09-02
- 1.0.0 — 2022-09-02

## README

# free-http-client<!-- omit in toc -->



> The [http client](https://www.npmjs.com/package/free-http-client) package based on curl for Node.js.

[free-http-client](https://www.npmjs.com/package/free-http-client) : support methods DELETE | GET | PUT | POST

- [Quick Start](#)
    - [Install](#)
    - [Sample Request  using free-http-client](#)

## Started 

### Install
```shell
npm i free-http-client --save
```
or
```shell
yarn add free-http-client
```

### Sample request with GET
> This API is at version 1. You can contribute to its evolution.

```javascript
const freeHttpclient = require('free-http-client');
let url = "https://xxx.com"
let res = await  freeHttpclient.get(url,{
  headers:{
    'Content-Type':'application/json',
    'Authorization':'Basic xxxxxxxxxxx',
  }
})
console.log('res data in json',res.data)
console.log('http status code',res.status)
console.log('response headers',res.headers)

```

### Sample request with DELETE
> This API is at version 1. You can contribute to its evolution.

```javascript
const freeHttpclient = require('free-http-client');
let url = "https://xxx.com"
let res = await  freeHttpclient.delete(url,{
  headers:{
    'Content-Type':'application/json',
    'Authorization':'Basic xxxxxxxxxxx',
  }
})
console.log('res data in json',res.data)
console.log('http status code',res.status)
console.log('response headers',res.headers)

```

### Sample request with POST
> This API is at version 1. You can contribute to its evolution.

```javascript
const freeHttpclient = require('free-http-client');

let res = await  freeHttpclient.post(url,{
  json:{
    field:"value"
  },
  headers:{
    'Content-Type':'application/json',
    'Authorization':'Basic xxxxxxxxxxx',
  }
})
console.log('res data in json',res.data)
console.log('http status code',res.status)
console.log('response headers',res.headers)

```

### Sample request with PUT
> This API is at version 1. You can contribute to its evolution.

```javascript
const freeHttpclient = require('free-http-client');

let res = await  freeHttpclient.put(url,{
  json:{
    field:"value"
  },
  headers:{
    'Content-Type':'application/json',
    'Authorization':'Basic xxxxxxxxxxx',
  }
})
console.log('res data in json',res.data)
console.log('http status code',res.status)
console.log('response headers',res.headers)

```

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