The Request Object
The Request object is the one who has been pruned the most from the Cocoon Environment. The sections that were pruned were:
- URI handling
- Session handling
NOTE(SM/RR): Session handling has been removed in favor of the cocoon object and URI handling has been removed because unnecessary. I'm aware this is a big statement, please see below of why this is so.
methods
attributes
get(name)
getAttribute(name)
get!AttributeNames()
setAttribute(name,value)
removeAttribute(name)
encoding
get!CharacterEncoding()
set!CharacterEncoding(encoding)
payload
get!ContentLength()
get!ContentType()
parameters
getParameter(name)
get!ParameterValues(name)
get!ParameterNames()
transport
get!AuthType()
getProtocol()
getScheme()
getMethod()
get!ServerName()
get!ServerPort()
get!RemoteAddr()
get!RemoteHost()
isSecure()
locale
getLocale()
getLocales()
cookies
getCookies()
headers
getHeader()
getHeaders()
get!HeadersNames()
authentication
get!RemoteUser()
get!UserPrincipal()
is!UserInRole(role)
properties
[name] -> maps to the parameter indicates with the name
For example request.blah is equivalent to request.getParameter("blah")