My simple HTTP request results in 400 status code in NodeJS
<p>I'm trying to access a particular profile by name on SoundCloud but I'm always getting the <code>400</code> status code. What am I doing wrong?</p>

<p>This is my code.</p>

<pre><code>var request = require('request');
request('https://soundcloud.com/lifeofdesiigner', function (err, response) {
  console.log(response.statusCode, response.headers);
});
</code></pre>

<p>And this is my output.</p>

<pre><code>400 {
      'cache-control': 'private, max-age=0',
      'content-type': 'text/html',
       date: 'Sat, 02 Apr 2016 11:25:08 GMT',
       server: 'am/2',
      'set-cookie': [ 'sc_anonymous_id=473227-393077-384395-502205; path=/; expires=Tue, 31 Mar 2026 11:25:08 GMT; domain=.soundcloud.com' ],
       via: 'sssr',
      'x-frame-options': 'SAMEORIGIN',
      'content-length': '15054',
       connection: 'close'
}
</code></pre>

<p><strong>Edit:</strong> I tried the same with <code>curl</code> and got the proper response with <code>200</code> status code and the requested resource. It just wouldn't work with NodeJS' <code>http</code> or <code>request</code> modules.</p>