@cafebazaar/hod
TypeScript icon, indicating that this package has built-in type declarations

0.4.14 • Public • Published

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)
})

Dependencies (2)

Dev Dependencies (25)

Package Sidebar

Install

npm i @cafebazaar/hod

Weekly Downloads

0

Version

0.4.14

License

MIT

Unpacked Size

104 kB

Total Files

12

Last publish

Collaborators

  • _mahdude
  • amir_mousavi
  • nainemom