Node.js
http API Reference
Node.js http module for building HTTP servers and issuing HTTP clients requests.
By EZ4Code Team
http
Server and client utilities from the http module.
http.createServer(requestListener?) -> http.ServerReturns a new HTTP server that invokes the listener for each request.
Returns: http.Server
http.request(options, callback?) -> http.ClientRequestInitiates an HTTP request and returns the ClientRequest; emit 'response' or pass a callback.
Returns: http.ClientRequest
server.listen(port, hostname?, callback?) -> serverStarts listening for connections on the given port and optional hostname.
Returns: http.Server
http.get(options, callback?) -> http.ClientRequestConvenience method for GET requests; auto-calls req.end().
Returns: http.ClientRequest