Kayden - (Beta)
Overview
A light weight promise based request client.
Both XMLHttpRequests for browsers and HTTP for node.js
Installation
$ npm install kayden
Usage
Get
const url = 'https://jsonplaceholder.typicode.com/posts' const data = async { try const response = await kayden return response catch e console }
Post
const config = url: 'https://jsonplaceholder.typicode.com/posts' body: id: 101 title: 'foo' body: 'bar' userId: 1 const data = async { try const response = await kayden return response catch e console }
.then().catch() syntax
kayden }
Methods
Methods used on the instances: