From 07d155d2da09011b23f4f8aba0793957a31ba874 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Tue, 18 Feb 2014 19:52:16 +0100 Subject: [PATCH] support function pointer in match method of URLRouter --- source/vibe/http/router.d | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/vibe/http/router.d b/source/vibe/http/router.d index e2b340d42a..81e0d36b11 100644 --- a/source/vibe/http/router.d +++ b/source/vibe/http/router.d @@ -142,6 +142,12 @@ class URLRouter : HTTPRouter { m_routes[method] ~= Route(path, cb); return this; } + + /// ditto + URLRouter match(HTTPMethod method, string path, HTTPServerRequestFunction cb) + { + return match(method,path,toDelegate(cb)); + } /// Handles a HTTP request by dispatching it to the registered route handlers. void handleRequest(HTTPServerRequest req, HTTPServerResponse res)