I use the UrlFetchApp to execute the query of Sheet in Google App Script. It works fine if my query string is not too long. As the url size limit of UrlFetchApp is only 2k. I would like to know if it is possible to use POST method to execute the query?
I tried below. But it does not work.
url = 'https://docs.google.com/spreadsheets/d/SHEETKEY/gviz/tq'
var payload = {
gid = sheetid,
tq = myquerystring,
};
var options = {
method:'POST',
payload:payload
};
UrlFetchApp.fetch(url, options);