Reputation: 2841
I'm trying to download some reports using Google Sheets.
So basically I'm using UrlFetchApp
to do the job and it does when the response is received within 1 minute. If the response is taking more than a minute then the request times out and the reports are not downloaded.
This is the options that I'm sending with UrlFetchApp
:
var options = {
"method" : "post",
"header" : "someHeaders",
"muteHttpExceptions" : true,
"followRedirects" : false,
"Content-Encoding" : "gzip",
"payload" : "somePayload"
}
and then a simple call of .fetch()
.
Is there a way to increase the timeout or any workaround for it?
Upvotes: 9
Views: 6861
Reputation: 3340
Although it's not publicly documented, I realized by testing that fetch functions for UrlFetchApp
[1] have a 1 minute timeout. There's a Feature Request open to extend or allow to configure the UrlFetchApp
timeout [2].
[1] https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
[2] https://issuetracker.google.com/issues/36761852
Upvotes: 13