# react-http-lib

> Wrapper to do HTTP API calls.\ Uses Axios internally to make requests. \ This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

Latest version **0.0.17-rc.6** (published 2022-02-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-http-lib
pnpm add react-http-lib
yarn add react-http-lib
bun add react-http-lib
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.17-rc.6 |
| Published | 2022-02-17 |
| First published | 2021-10-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 14 |
| Unpacked size | 814.8 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | khush.710 |

## Links

- npm: https://www.npmjs.com/package/react-http-lib
- npm.io page: https://npm.io/package/react-http-lib

## Dependencies (14)

- [rxjs](https://npm.io/package/rxjs.md) ^7.3.1
- [axios](https://npm.io/package/axios.md) ^0.22.0
- [react](https://npm.io/package/react.md) ^17.0.2
- [rollup](https://npm.io/package/rollup.md) ^2.58.0
- [postcss](https://npm.io/package/postcss.md) ^8.3.9
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2
- [typescript](https://npm.io/package/typescript.md) ^4.4.3
- [@types/react](https://npm.io/package/@types/react.md) ^17.0.27
- [universal-cookie](https://npm.io/package/universal-cookie.md) ^4.0.4
- [rollup-plugin-postcss](https://npm.io/package/rollup-plugin-postcss.md) ^4.0.1
- [@rollup/plugin-commonjs](https://npm.io/package/@rollup/plugin-commonjs.md) ^21.0.0
- [rollup-plugin-typescript2](https://npm.io/package/rollup-plugin-typescript2.md) ^0.30.0
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) ^13.0.5
- [rollup-plugin-peer-deps-external](https://npm.io/package/rollup-plugin-peer-deps-external.md) ^2.2.4

## Recent versions

- 0.0.17-rc.6 (latest) — 2022-02-17
- 0.0.17-rc.5 — 2022-01-31
- 0.0.17-rc.4 — 2022-01-31
- 0.0.17-rc.3 — 2022-01-31
- 0.0.17-rc.2 — 2022-01-31
- 0.0.17-rc.1 — 2022-01-31
- 0.0.1-7.rc-1 — 2022-01-31
- 0.0.17 — 2022-01-31
- 0.0.16 — 2022-01-27
- 0.0.15 — 2022-01-27
- 0.0.14 — 2021-11-12
- 0.0.13 — 2021-11-11
- 0.0.12 — 2021-11-10
- 0.0.11 — 2021-11-10
- 0.0.10 — 2021-11-10
- … 11 more at https://npm.io/package/react-http-lib/versions

## README

# Getting Started with react-http-lib

Wrapper to do HTTP API calls.\
Uses Axios internally to make requests. \
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Installation

In the project directory, you can run:

### `npm install --save react-http-lib`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.


### How to use?

#### HTTP API call with method GET 

```
callGetApi: async () => {
            try {
                    const response = await httpService.get(endPoint, params, contentType, backendUrl, extraHeaders, responseType, withCredentials);
                    console.log(response);
                } catch (e) {
                    setResponse(undefined);
                    setError(e as any);
                    console.log('Http Error(from Storybook)', e);
                }
            }
       }
```
##### Refer storybook for more examples

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