title: Javascript - How to make REST API Calls
body: <p>I am trying to access Firebase Database using REST API. Using cURL i am able to retrive data. I am unable to do the same in javascript.</p>
  
  <p>cURL</p>
  
  <pre><code>curl 'https://testproject123.firebaseio.com/subscription.json?auth=aabbccddeeff123'
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>var request = require('request');
  
  var options = {
      url: 'https://testproject123.firebaseio.com/subscription.json?auth=aabbccddeeff123' };
  
  function callback(error, response, body) {
      if (!error &amp;&amp; response.statusCode == 200) {
          console.log(body);
      } }
  
  request(options, callback);
  </code></pre>
  
  <p>Note: The above code i am trying to run on Bluemix/OpenWhisk.
  Kindly let me know how to fix this.</p>