title: How to connect to a third party API from node.js using Express.js
body: <p>I am trying to connect to a third party api with authorization key but no luck. Any suggestion/direction/comment would be appreciated. </p>
  
  <p><strong>server.js</strong></p>
  
  <pre><code>...
  
  app.get('/products', (req, res) =&gt; {
  
  request.get(BASE_URL, {
    'auth': {
    'bearer': 'abcdsfegete'
  }
   }).on('error', function (error) {
      console.log(error);
  
   }).on('response', function (response) {
      console.log(response);
   })
  res.send();
  })
  ...
  </code></pre>
  
  <p><strong>Result:</strong> I keep getting "This response has to data available".</p>