title: Not sending userAgent in header, Node.js console application
body: <p>I'm just beginning to learn javascript and https requests.  I'm working in Visual Studio 2017, I created a blank javascript console app from the template and added the following code.</p>
  
  <pre><code>const https = require('https');
  
  const options = {
      hostname: 'api.gdax.com',
      path: '/products/BTC-USD/stats',
      method: 'GET',
      agent: false
  };
  
  const req = https.request(options, (res) =&gt; {
      console.log('statusCode:', res.statusCode);
      console.log('headers:', res.headers);
  
      res.on('data', (d) =&gt; {
          process.stdout.write(d);
      });
  });
  
  req.on('error', (e) =&gt; {
      console.error(e);
  });
  req.end();
  </code></pre>
  
  <p>The response I get from the server is </p>
  
  <pre><code>{"message":"User-Agent header is required."}
  </code></pre>
  
  <p>When I navigate to <a href="https://api.gdax.com/products/BTC-USD/stats" rel="nofollow noreferrer">https://api.gdax.com/products/BTC-USD/stats</a> in my browser I get the correct response.  How come I can't do the same in a javascript console?</p>