1.2.3 • Published 4 years ago

@unibiz/orbit-base v1.2.3

Weekly downloads
1
License
UNLICENSED
Repository
bitbucket
Last release
4 years ago

Table of Contents

Request

Api

Api module is used to call remote api's. It is capable of making GET, PUT, POST and DELETE calls as demonstrated below.

GET call to a server.

import Api from '@unibiz/orbit/api';
const api = Api('<auth token will go here>');
const host = 'http://api.example.com';

api.get(`{host}/status`)
   .then(data => {
     // Do something with data
   })
   .catch(err => {
    // Handler / log error.
   });

misc