The ultra-lightweight Node.js HTTP client
const p =const res = awaitconsole
Note that the above should be in an async context! phin also provides an unpromisified version of the library.
npm install phin
phin is trusted by some really important projects. The hundreds of contributors at Less, for example, depend on phin as part of their development process.
Also, phin is super lightweight. Like 99.8% smaller than request lightweight. To compare to other libraries, see phin vs. the Competition.
const p = unpromisified
Simple parsing of JSON:
// (In async function in this case.)const res = awaitconsole
phin vs. the Competition
phin is a very lightweight library.
It contains all of the common HTTP client features included in competing libraries!