The request keyword returns a reference to the current HTTP request object (see javax.servlet.http.HttpServletRequest). It can be used to access HTTP GET request parameters.


The request object of a page that was accessed with the URL

looks like this: = "Test"
request.value = 123


To access parameters from HTTP POST requests, please use the retrieve() function.


If you are running methods from a Cron job, the request object is null, so if you are using that method in another context where you want to supply request parameters, in order for it to stay error-free in the Cron context, you need to null-check the request.

let request = Structr.get('request');
if (Structr.empty(request)) {
    // empty request so we are probably in a Cron context
About this article
Last change 2019-02-28
Topics FrontendStructr 2.0