title: How to include OAuth headers into async fetch request?
body: <p>I would like to use asynchronous requests in my google engine application to trigger google app script (which is deployed as web app) :</p>
  
  <pre><code>URLFetchService fetcher = URLFetchServiceFactory.getURLFetchService();
  Future future = fetcher.fetchAsync(req);
  HTTPResponse response = (HTTPResponse) future.get();
  </code></pre>
  
  <p>but fetchAsync method accepts only urls or <strong>com.google.appengine.api.urlfetch.HTTPRequest</strong>
  which does not offer much more options : <a href="https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/HTTPRequest" rel="nofollow">https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/HTTPRequest</a></p>
  
  <p>I do not see way how to add OAuth security headers into asynchrounous fetch service. We build authorized requests by using standart HttpRequest method. </p>
  
  <p>Sample HttpRequest with included OAuth :</p>
  
  <pre><code> HttpRequest contactrequest = rf.buildGetRequest(shortenEndpoint);
      GoogleHeaders headers = new GoogleHeaders();
      headers.setContentType("application/x-www-form-urlencoded");
      headers.setAuthorization("OAuth " + creds.getAccessToken());
      contactrequest.setHeaders(headers);
      contactrequest.getHeaders().set("GData-Version", "3.0");
  </code></pre>
  
  <p>Is there a way how to send async OAuth authorized requests ? </p>