Answer by Brad for http.request vs http.createServer
http.request() makes a request to another HTTP server. Suppose for some reason I wanted to go download Stack Overflow's home page...http.request('https://stackoverflow.com/', (res) => { //...
View ArticleAnswer by yodebu for http.request vs http.createServer
Based on the source code of nodejs (extract below), createServer is just a helper method to instantiate a Server.Extract from line 1674 of http.js.exports.Server = Server;exports.createServer =...
View Articlehttp.request vs http.createServer
What is the difference between the request in this line of code: http.createServer(function(request,response){. . .}and request in http.request()Are both requests done to the server?I am new to node.js...
View Article
More Pages to Explore .....