A bare bones Node.js HTTP get library that returns a promise. Automatically parses JSON. Inspired from Tomas Dvorak's article.
Install it via npm:
$ npm install https://github.com/dombrant/get
Then import it (Note: get.js
only supports ES module syntax):
import get from "get";
get("https://api.example.com")
.then((response) => console.log(response))
.catch((error) => console.log(error));
Dominic Brant.
If you have any thoughts/suggestions/problems, feel free to open an issue.
MIT© Dominic Brant