A small library providing convenient methods to call a JSON-style REST API.
npm install qmerce-rest --save
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));