@cafebazaar/hod

Hod is a HTTP service based on fetch API.

Usage no npm install needed!

<script type="module">
  import cafebazaarHod from 'https://cdn.skypack.dev/@cafebazaar/hod';
</script>

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