Get request data from current context
current_context.RdThese read-only helpers provide access to request data for the current HTTP request via the freshwater request context.
current_path()returns the request URL pathcurrent_method()returns the HTTP methodcurrent_query()returns the query parameterscurrent_cookie()returns the value of a cookie by namecurrent_header()returns the value of a header by name
These functions are primarily intended for use inside templates where a request context has been established. If called outside of an active context, an error is raised.
Context is available when freshwater context middleware is
active (installed automatically by api_csrf(),
api_error_pages(), or api_freshwater()).