request
The request object has attributes of the current state of the web page.
request.format
Returns format of current request.
request.fullpath
Returns full path, include query string.
request.language
Returns a language object for the current language.
request.path
Returns only path, without query string.
request.query
Returns query string. Everything after ‘?’.
request.query_object
Converts the query string into an object
request.url
Returns the full current url.
request.flash
Contains browser flash messages like form errors.
request.user_agent
Returns the user agent.
request.body
Returns the request body for POST and PUT requests. Returns `nil` on GET requests
request.request_method
Returns HTTP request method for current request. One of GET, POST or PUT.
request.inline_cms_active
Returns true when the request comes from a user using the inline CMS. So this returns false when a regular site visitor visits a page. This allows for showing/hiding specific data to CMS users or site visitors.
request.csp_nonce
Returns the nonce that can be used for inline scripts to implement the Content Security Policy of your site properly.