请求
$request 保存页面正在响应的请求:method、scheme、path、url、query、form、headers、cookies、params 和 body。以 https://example.com/people?page=2 为例,$request.scheme 为 https,$request.path 为 /people,$request.url 为 /people?page=2:
<let name="page" value="($request.query.page ?? '1')->to_number(default: 1)" />
<p>Page {$page} of the people list, at {$request.path}</p>query 或 form 中的值是文本。多次发送的名称(?tag=a&tag=b,或一组复选框)是文本列表。对于普通的表单提交,body 是按原样发送的文本(name=Ada&tag=a)。对于包含文件的表单,它为空。位于语言前缀下的页面还会获得 $request.locale。