class WebService { // automatically mapped to: POST /logout void postLogout() { terminateSession(); 201.status; redirect("/"); } } void run() { auto router = new URLRouter; router.registerWebInterface(new WebService); auto settings = new HTTPServerSettings; settings.port = 8080; listenHTTP(settings, router); }
Terminates the currently active session (if any).
Note that this may only be called from a function/method registered using registerWebInterface.