Fix up router, add .post route

This commit is contained in:
Alex Hultman
2018-10-03 19:36:46 +02:00
parent d4ca158495
commit 7d06bef485
5 changed files with 48 additions and 19 deletions
+5
View File
@@ -32,6 +32,11 @@ public:
return *this;
}
TemplatedApp &post(std::string pattern, std::function<void(HttpResponse<SSL> *, HttpRequest *)> handler) {
httpContext->onPost(pattern, handler);
return *this;
}
TemplatedApp &unhandled(std::function<void(HttpResponse<SSL> *, HttpRequest *)> handler) {
httpContext->onUnhandled(handler);
return *this;