npm.io
0.1.1 • Published 10 years ago

qmerce-rest

Licence
MIT
Version
0.1.1
Deps
1
Vulns
1
Weekly
0

qmerce-rest

A small library providing convenient methods to call a JSON-style REST API.

Installation

npm install qmerce-rest --save

Usage

const rest = require('qmerce-rest')
const api = rest(URL, { user: USER, password: PASSWORD });

api.getAsync()
.then((data) {
	data.counter++;
	return api.putAsync(data);
})
.then(() => api.deleteAsync())
.catch((err) => console.log(err));

Keywords