use of act.xio.undertow.UndertowRequest in project actframework by actframework.
the class ActionContext method forward.
public void forward(String url) {
E.illegalArgumentIfNot(url.startsWith("/"), "forward URL must starts with single '/'");
E.illegalArgumentIf(url.startsWith("//"), "forward URL must starts with single `/`");
E.unexpectedIfNot(H.Method.GET == req().method(), "forward only support on HTTP GET request");
uploads.clear();
extraParams.clear();
bodyParams = null;
urlPath = UrlPath.of(url);
UndertowRequest req = $.cast(req());
state = State.CREATED;
req.forward(url);
final RequestHandler requestHandler = router.getInvoker(H.Method.GET, url, this);
app().eventBus().emit(new PreHandle(this));
requestHandler.handle(this);
}
Aggregations