Chapter 10. Header Functions

Web::charset / Web::charset=(new_charset)
Get / set charset.
Web::cookies_sent
Returns a hash of all the cookie name/value pairs that have been set on the server.
Web::content_type() / Web::content_type=(new_content_type)
Get / set content type. The default content-type is "text/html".
Web::encoding / Web::encoding=( new_encoding )
Get / set character encoding.a
Web::get_cookie(key)
Returns an array of cookie values that have been set. Path / Expires / etc. info is currently not returned. Note that this is different from the cookies that the browser submitted to the server.
Web::status / Web::status=(new_status)
Get / Set new status, as in:
Web::status = 200
Web::set_cookie( name, value, options={} )

Sends client a cookie with the given name and a value, and these optional keyword arguments:

:path
Path string
:domain
Domain string
:expires
Date this cookie should expire
:secure
Whether this cookie should be tagged as secure or not.
Web::set_redirect( new_location )
Sets the status and the location appropriately.