Call APIs easier than ever with Chapar
Using npm:
$ npm install @hamidrezana/chapar
Using yarn:
$ yarn add @hamidrezana/chapar
Firstly import Chapar
import Chapar from '@hamidrezana/chapar';
Then create new instant of Chapar
const chapar = new Chapar('https://jsonplaceholder.typicode.com');
Then you can call APIs easily with sendChapar
method
const response = await chapar.sendChapar('todos/1', { method: 'get' });
- Complete Documentation
- Supporting multiple base urls
- Supporting onError callback
- Supporting response template