dispatcher

A URL dispatcher.

1 if(cgi.dispatcher!(
2 	"/api/".serveApi!MyApiClass,
3 	"/objects/lol".serveRestObject!MyRestObject,
4 	"/file.js".serveStaticFile,
5 	"/admin/".dispatchTo!adminHandler
6 )) return;
More...
template dispatcher(definitions...)
version(with_breaking_cgi_features)
bool
dispatcher
(
Presenter
)
(,
Presenter presenterArg = null
)

Detailed Description

You define a series of url prefixes followed by handlers.

dispatchTo will send the request to another function for handling. You may want to do different pre- and post- processing there, for example, an authorization check and different page layout. You can use different presenters and different function chains. NOT IMPLEMENTED

Meta