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