@cuvva/json-client

1.0.3 • Public • Published

json client

Simple library for requesting data from JSON APIs.

Returns promises only. Standard callbacks are not supported.

const jsonClient = require('@cuvva/json-client');
const client = jsonClient('https://api.example.com/v1');

await client('get', 'users/123');

Installation

$ npm install @cuvva/json-client

Notes

json client uses fetch to make requests internally. It does this via the fetch-everywhere package.

In theory, fetch-everywhere should support all environments. If yours isn't yet covered, please open an issue on the repo.

Support

Please open an issue on this repository.

Authors

License

MIT licensed - see LICENSE file

Package Sidebar

Install

npm i @cuvva/json-client

Weekly Downloads

385

Version

1.0.3

License

MIT

Unpacked Size

10.4 kB

Total Files

7

Last publish

Collaborators

  • ilya.ageev
  • julesjcraske
  • cuvva-jb
  • cuvva-old
  • cuvva-ci