title: Google App Script: URLFetchApp.fetch with header
body: <p>I'm trying to fetch data from the rainforestqa API but to gain access I need to send my api_key as a header. The code I already have is as follows,</p>
  
  <pre><code>var header = {
       "access-control-allow-headers":"Content-Type",
       "CLIENT_TOKEN" : "API-TOKEN"
  }; 
  
  var options = {
       "method" : "post",
       "header" : header
  };
  
  UrlFetchApp.fetch("https://app.rainforestqa.com:443/api/1/runs/TESTNUMBER/tests.json?result=failed", options);
  </code></pre>
  
  <p>But this returns 405 error. Does anyone have any ideas why this isn't working?</p>
  
  <p>Thanks</p>