# orsys-http-client

> Http Client

Latest version **1.0.2** (published 2019-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install orsys-http-client
pnpm add orsys-http-client
yarn add orsys-http-client
bun add orsys-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.2 |
| Published | 2019-11-07 |
| First published | 2019-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sellam Mhammad |
| Maintainers | msellam90 |
| Keywords | Http, orsys |

## Links

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

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.19.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [orsys-store](https://npm.io/package/orsys-store.md) ^1.0.4

## Recent versions

- 1.0.2 (latest) — 2019-11-07
- 1.0.1 — 2019-11-07
- 1.0.0 — 2019-10-28

## README

# Orsys-HTTP-client


Available via:

- NPM: `npm install --save orsys-http-client`
- YARN: `yarn add orsys-http-client`

## Usage

All you need to do is :

**1- Create Instance of HTTPClient**

```js
    const api = new HTTPClient(Store, {
        baseURL: "http://localhost:8081/api",
    })
```

**2- Register the endpoints**

```js
    api.registerEP('test', {
        payload: {},
        url: "/url/test",
    })
```


**3- Usage of the endpoints**
```js
    api.fetch({ endpoint: 'test' }).then(function(result){
        // do somthing with result
    }).catch(function(error){
        // error
    })
```

OR

```js
    api.fetch({ endpoint: 'test' }, 'key')
    // key: is the key in the store where the result will set
```

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