http libs with extended utilities
npm i -S http-scraper
import Http from "http-scraper"
const host = 'api.ipify.org';
const uri = 'https://api.ipify.org';
const options = {host, uri};
const http = Http(options);
return http.get(options)
.get('body')
.then(({ip}) => {
assert.equal(Boolean(ip), true, 'should get ip');
})
.catch(assert.end);
For more usage information, check tests directory.
MIT © Raabb Ajam