The http
package contains support for the raw HTTP protocol. While it can do everything, often it’s a bit clumsy to use.
The request
module uses the http
module and adds a lot of sugar to make it easier to digest: A lot of common cases can be handled with just a tiny bit of code, it supports piping request data, forwarding requests to a different server, etc.