@cafebazaar/hod
v0.4.14
Published
Hod is a HTTP service based on fetch API.
Downloads
38
Readme
Hod
Hod is a HTTP service based on fetch API.
Installation
$ npm i @cafebazaar/hod
$ yarn add @cafebazaar/hod
Basic Usage
import Hod from '@cafebazaar/hod';
Hod.get('http://to.com/:id', {
params: {
id: 1,
},
}).then(( res ) =>{
console.log(res) // response
console.log(res.data) // parsed response
}).catch(({ type, typeCode, details }) => {
console.log(type, typeCode, details)
})