web_response->addHeader
Adds a response header.
Target
Signature
1web_response->addHeader(header::pair)Adds a response header.
web_response->addHeader is called with member syntax on a receiver value. web_response->addHeader belongs at the request or response boundary. Treat visitor input as untrusted, validate before use, and encode values before writing them into HTML.
Parameters
header- Required value of type
pair. Supplyheaderpositionally unless the signature shows a keyword form.
Examples
Basic call
1web_response->addHeader('Cache-Control'='no-store')The example belongs near a request or response boundary; validate visitor input before trusting it.