Can I modify the HTTP response headers to add cookies and extra information? Also I'm having troubles reading the request headers.
相关问题
- How can I force all files in a folder to be owned
- Google Apps Script: testing doPost() with cURL
- Google Apps Script to turn in, grade, and return a
- Script fails on SpreadsheetApp.openById - Requires
- Split Lines and Bold Text within a ui.alert Window
相关文章
- How to allow access for importrange function via a
- Google app script trigger not working
- Set Date/Time to 00:00:00
- indexOf returning -1 despite object being in the a
- How can my Google Apps Script be run by others the
- How to stop execution of Google Apps Script?
- Profiling the Performance of a Google App Script
- String starts with in Google Script
You cannot read or set HTTP Headers in a Apps Script app deployed as a web app. You are restricted to reading the query string or the post values for GET/POST respectively. When responding you can only return the content and the MIME type (restricted to a few types)
This is because the scripts are served off the Google.com domain and you should not have ways to set/get cookies that could potentially be used for malicious reasons.
However, if you are using UrlFetch within an Apps Script app to make outbound calls, you have much more control of the HTTP headers