http-fetch-wrapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

HTTP Fetch Wrapper

Http client wrapper around fetch

Usage

import { API } from 'http-fetch-wrapper';

const api = new API({
  baseURL: 'http://localhost:3000',
});

const data = await api.get('/animals');

Response

export interface APIResponse<DataType = any> {
  data: DataType,
  status: number,
  raw?: Response,
  type?: string,
}

Readme

Keywords

Package Sidebar

Install

npm i http-fetch-wrapper

Weekly Downloads

3

Version

1.0.3

License

ISC

Unpacked Size

7.6 kB

Total Files

5

Last publish

Collaborators

  • larrrssss