dayler-utils
v1.1.4
Published
![logo](https://cdn.dayler.io/images/logo_dark.svg) --- ![Build Status](https://drone.dayler.io/api/badges/iknpx/dayler-utils/status.svg) [![npm version](https://badge.fury.io/js/dayler-utils.svg)](https://badge.fury.io/js/dayler-utils) [![Downloads](http
Downloads
17
Readme
Dayler Utils
Installation
npm install --save dayler-utils
Request
import { Request } from 'dayler-utils';
const request = new Request('http://api.example.com', headers?);
request.get('http://example.com');
request.get(url, headers?)
request.delete(url, headers?)
request.post(url, data, headers?)
request.put(url, data, headers?)
request.patch(url, data, headers?)
Session
import { Session } from 'dayler-utils';
const session = new Session('storage_key', 'local' || 'session');
session.getToken() // get session token
session.setToken(string) // set session token