Making a GET request with Node is trivial; in fact, HTTP GET requests have been covered in Chapter 4, Using Streams in the context of stream processing.
HTTP GET requests are so simple that we can fit a request that prints to STDOUT into a single shell command (the -e flag passed to the node binary instructs Node to evaluate the string that follows the flag):
$ node -e "require('http').get('http://example.com', (res) => res.pipe(process.stdout))"
In this recipe, we'll look into constructing POST requests.