Updated: Taking advantage of Web Apps with Google Apps Script
New section CORS in Web Apps was added to Taking advantage of Web Apps with Google Apps Script
In this section, I would like to introduce CORS in Web Apps. As the result, in order to prevent the error related to CORS, it was found the following important points.
-
It is required to return
ContentService.createTextOutput()andContentService.createTextOutput("done")fromdoGetanddoPost. -
For POST method, the data is required to be converted to the string and sent to Web Apps.