
I have created a Google Sheet App Script and published as web app. https://script.google.com/macros/s/AKfycbyqUxINw93wmWPouXb7nOjt2886FBj6HBKg9sMF1B4rMN0I1xFG/exec
While i tried to POST data to this url, it's redirect to another URL. How i can avoid this redirection.?
Don't use ContentService. if you are using ContentService for returning JSON data. it will redirect to another URL. That's why your are getting 302 response.
return ContentService.createTextOutput(JSON.stringify(result))
.setMimeType(ContentService.MimeType.JSON);
https://developers.google.com/apps-script/guides/content#redirects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With