Is there a limit to the size when making HTTP GET requests in Node.js? And if so, how can I change this?
var url = "..." // very long, ~50'000 chars
http.get(url, function (res) {
res.pipe(fs.createWriteStream("file.txt"));
});
Gives me this:
<html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>
Same thing using wget in PowerShell or Bash works perfectly fine.
$url = "..."
wget -outf file.txt $url