Response Module
Import
Represents the current response object. setHeader, write and setStatusCode are only available in scripts originating from a custom Route script request.
Methods
setHeader(name, value) write(data) setStatusCode(code) setCookie(name, value, options) clearCookie(name, options)
setHeader(name, value)
Arguments
name
(String) header namevalue
(String) header value
write(data)
Arguments
data
(String) response data.
setStatusCode(code)
Arguments
code
(Number) the http status code.
setCookie(name, value, options)
Arguments
name
(String) cookie namevalue
(Object) cookie valueoptions
(Object)signed
(Boolean:false)secure
(Boolean:false)maxAge
(Number:null)httpOnly
(Boolean:false)
clearCookie(name, options)
Arguments
name
(String) cookie nameoptions
(Object)signed
(Boolean:false)secure
(Boolean:false)maxAge
(Number:null)httpOnly
(Boolean:false)
Last updated