Question
In Google Apps Script, are there alternative ways to get data from external URLs?
The preferred way using UrlFetchApp.fetch(URL)
doesn't work in my case.
The retrieved data (a JSON string) is cut off, probably because it's too long.
Code to show the limitation
function ShowFetchLimit() {
var request = UrlFetchApp.fetch("http://www.gw2spidy.com/api/v0.9/json/all-items/all")
var response = request.getContentText()
Logger.log('Your retrieved string length is ' response.length)
}
Preview on a public Google-Apps script
Log output
Your retrieved string length is: 10.485.277
But the real string length should be 11.439.522 characters long. It seems I'm hitting a Google Script limitation, maybe the URL Fetch POST size limit which is 10MB per call