Programming node.js, php, python, java…

Menu

Node.js http get example does not work here is fix

Many of us has tried the node.js example how to make HTTP get request. Only problem is that it does not get you the correct google web page as it returns the HTTP code 302. This means that the site has to redirected to other site, which is basically mapped by your IP local site google.ee (estonia) or google.fi (finland). That is the reason why the first request fails in node, I made simple workaround for this.