dispatchTo

Dispatches the URL (and anything under it) to another dispatcher function. The function should look something like this:

1 bool other(DD)(DD dd) {
2 	return dd.dispatcher!(
3 		"/whatever".serveRedirect("/success"),
4 		"/api/".serveApi!MyClass
5 	);
6 }

The DD in there will be an instance of DispatcherData which you can inspect, or forward to another dispatcher here. It is a template to account for any Presenter type, so you can do compile-time analysis in your presenters. Or, of course, you could just use the exact type in your own code.

You return true if you handle the given url, or false if not. Just returning the result of dispatcher will do a good job.

version(with_breaking_cgi_features)
dispatchTo
(
alias handler
)
(
string urlPrefix
)

Meta