From bcd246076540a8353fa55fc0a5e19343c1a2dbc9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 14 Aug 2015 13:03:08 +0200 Subject: Implement package search service mockup --- web/module | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'web/module') diff --git a/web/module b/web/module index e1cccf0..7398d45 100644 --- a/web/module +++ b/web/module @@ -13,6 +13,8 @@ #include // move() #include // runtime_error +#include + namespace web { // HTTP status code. @@ -68,10 +70,20 @@ namespace web }; using name_values = std::vector; + using path = butl::path; class request { public: + using path_type = web::path; + + // Corresponds to abs_path portion of HTTP URL as described in + // "3.2.2 HTTP URL" of http://tools.ietf.org/html/rfc2616. + // Returns '/' if no abs_path is present in URL. + // + virtual const path_type& + path () = 0; + //@@ Why not pass parameters directly? Lazy parsing? //@@ Why not have something like operator[] for lookup? Probably // in name_values. -- cgit v1.1