A flexible, modular REST client built for ease-of-use and resilience
npm install --save http-transport
const url = 'http://example.com/';
const client = require('http-transport').createClient();
client
.get(url)
.asResponse()
.then((res) => {
if (res.statusCode === 200) {
console.log(res.body);
}
});
});For more examples and API details, see API documentation
npm test
To generate a test coverage report:
npm run coverage