Sets or gets the HTTP response header fields.
The headers
property contains an object of key:value
pairs where the key
is the header field name and the value
is the header field value.
When defining a content-type
key, note that for Free sites,text/html
is not
supported. Premium sites support all content types.
// In http-functions.js
export function use_myFunction(request) {
let headers = response.headers;
/* headers:
* {
* "content-type": "application/json",
* "last-modified": "Tue, 26 Sep 2017 00:00:00 GMT"
* }
*/
}