headers. HTTP-response headers   [3.1.5]

$form:headers

Such a construction returns hash with all HTTP-response headers set so far.
Names of HTTP-response fields are in uppercase letters.   [3.4.4]

Example
$response:expires[^date::now(+1)]
^response:headers.foreach[header;value]{
   $header - ^if($value is "string" || $value is "int" || $value is "double"){$value}{not printable}
}[
<br />]

…will output all HTTP-response headers that were set up to that moment.


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 05.04.2016