Wraps the Request library with a light weight ES6 promise.
url: the urlparameters: the json object to send as parameters
import request from 'pro-request';
request.get('http://web-service/').then((res) => {
// handle
});
request.post('http://web-service/', {
headers: { 'Content-Type': 'application/json' },
json: { id: '1', title: 'thing to do', }
}).then((res) => {
// handle
});
request.delete('http://web-service/', {
headers: { 'Content-Type': 'application/json' },
json: { id: '1' }
}).then((res) => {
// handle
});- to contribute, fork, branch and submit pull requests for review
- use Node 6
- use ES 6
npm testand maintain 100% coveragenpm run lintand maintain 0 errors (uses AirBnB JavaScript Style Guide)