22 #include <core/exception.h>
23 #include <webview/rest_api.h>
24 #include <webview/router.h>
45 router_{std::make_shared<WebviewRouter<Handler>>()}
67 std::map<std::string, std::string> path_args;
68 Handler handler = router_->find_handler(request->
method(), rest_url, path_args);
70 params.set_path_args(std::move(path_args));
72 std::unique_ptr<WebReply> reply = handler(request->
body(), params);
73 return reply.release();
87 router_->add(method, path, handler);
96 pretty_json_ = pretty;