title: Parse.Cloud.httpRequest call with HTTP request header
body: <p>I have a question for cloud code function "Parse.Cloud.httpRequest". I want to send HTTP GET request as the same as the following curl command. But it seems it is not working. If you find something wrong, please help.</p>
  
  <p><code>curl -H "Authorization: token xxx" "https://api.automatic.com/v1/trips"</code></p>
  
  <p><i>Note: </i></p>
  
  <p>My code is like this. Then I accessed /trips.</p>
  
  <pre><code>var express = require('express');
  var app = express();
  
  app.set('views', 'cloud/views');
  app.set('view engine', 'ejs');
  app.use(express.bodyParser());
  
  app.get('/trips', function(req, res) {
      Parse.Cloud.httpRequest({
          url: 'https://api.automatic.com/v1/trips',
          headers: {
              'Authorization': 'token xxx'
          },
          success: function (httpResponse) {
              console.log(httpResponse.text);
          },
          error: function (httpResponse) {
              console.error('Request failed with response code ' + httpResponse.status);
          }
      });
  });
  
  app.listen();
  </code></pre>
  
  <p>Here is a log.</p>
  
  <pre><code>E2014-07-16T04:10:46.102Z] v170: Ran custom endpoint with:
  Input: {"method"=&gt;"GET", "url"=&gt;"/trips", "headers"=&gt;{"version"=&gt;"HTTP/1.1",   "host"=&gt;"easyparking.parseapp.com", "user-agent"=&gt;"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36", "accept"=&gt;"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "accept-encoding"=&gt;"gzip,deflate,sdch", "accept-language"=&gt;"ja,en-US;q=0.8,en;q=0.6", "cache-control"=&gt;"max-age=0", "x-forwarded-proto"=&gt;"http"}}
  Result: success/error was not called
  </code></pre>