Lithium重定向发送请求数据

Lithium redirect send request data

正在尝试构建一个控制器方法,该方法可以重定向并发送请求数据。 Controller/route redirect 似乎没有任何东西可以实现这个。

This question gave a new approach 但我不知道如何重定向到指定页面而不是在当前页面上呈现。

$forward = Libraries::instance("controllers", "Main", [
     'request' => $this->request
]);
return $forward($this->request, ['action' => 'view']);

The route tests 似乎也没有提供任何见解,我怎样才能在仍然保留请求数据的同时实现 url 重定向?

从控制器内部:

$this->redirect(['AnotherController::anotherAction', '?' => $this->request->query], ['exit' => true]);

$this->request->data无法转发。浏览器位置重定向只能指定查询字符串。您也许可以使用包含输入 html 元素中的数据的表单呈现页面,并在加载时提交表单。或者您可以将数据存储在会话中或服务器端的某个地方,并在下一个请求时检索它。