This code defines a httpRequest function that makes HTTP requests using either the request module (if available) or a custom implementation based on the http and https modules.
httpRequest
request
http
https