title: Set timeout value for Urlfetchapp.fetch function
body: <p>I am trying to post a json payload to a url using Urlfetchapp.fetch function and receive a json response for that request. </p>
  
  <p>Sample code:</p>
  
  <pre><code>var url = "https://example.com/RST/myapi";
  var accessToken = getAccessToken();
  var headers = {
    "Authorization": "Bearer " + accessToken
  };
  var options = {
    "headers": headers,
    "method" : "POST",
    "contentType" : "application/json",
    "payload" : '{ "Name": "Mark" }',
    "muteHttpExceptions": true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  </code></pre>
  
  <p>However, my request get interrupted by timeout error. I am told that due to resource heavy APIs, the request can take upto 3 minutes to return a response depending on server status.</p>
  
  <p>Is there anyway to change the limit of timeout on this? Make it wait at least 3 mins till any response is received? </p>
  
  <p>EDIT: I was just told that the API service doesn't have a callback url argument, however it might respond faster on retrying again. But I am not sure how to do that? Its not a response error which I can catch and examine. But a timeout error which means nothing executes after that</p>
  
  <p>Thank you for your help.</p>