diff Core/RestApi/RestApi.cpp @ 1441:f3672356c121

refactoring: IHttpHandler and HttpToolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Jul 2015 10:38:39 +0200
parents b22ba8c5edbe
children 8dc80ba768aa
line wrap: on
line diff
--- a/Core/RestApi/RestApi.cpp	Wed Jul 01 10:18:26 2015 +0200
+++ b/Core/RestApi/RestApi.cpp	Wed Jul 01 10:38:39 2015 +0200
@@ -49,16 +49,16 @@
       RestApi& api_;
       RestApiOutput& output_;
       HttpMethod method_;
-      const HttpHandler::Arguments& headers_;
-      const HttpHandler::Arguments& getArguments_;
+      const IHttpHandler::Arguments& headers_;
+      const IHttpHandler::Arguments& getArguments_;
       const std::string& postData_;
 
     public:
       HttpHandlerVisitor(RestApi& api,
                          RestApiOutput& output,
                          HttpMethod method,
-                         const HttpHandler::Arguments& headers,
-                         const HttpHandler::Arguments& getArguments,
+                         const IHttpHandler::Arguments& headers,
+                         const IHttpHandler::Arguments& getArguments,
                          const std::string& postData) :
         api_(api),
         output_(output),
@@ -71,7 +71,7 @@
 
       virtual bool Visit(const RestApiHierarchy::Resource& resource,
                          const UriComponents& uri,
-                         const HttpHandler::Arguments& components,
+                         const IHttpHandler::Arguments& components,
                          const UriComponents& trailing)
       {
         if (resource.HasHandler(method_))
@@ -189,7 +189,7 @@
 #endif
 
     Arguments compiled;
-    HttpHandler::CompileGetArguments(compiled, getArguments);
+    HttpToolbox::CompileGetArguments(compiled, getArguments);
 
     HttpHandlerVisitor visitor(*this, wrappedOutput, method, headers, compiled, postData);