Bence Balint 3 лет назад
Родитель
Сommit
87e5102a24
1 измененных файлов с 13 добавлено и 0 удалено
  1. 13 0
      include/kbf/web_service.h

+ 13 - 0
include/kbf/web_service.h

@@ -69,12 +69,25 @@ namespace kbf {
 
         class Middleware;
 
+        /**
+         * @brief Adds a #Middleware to the service.
+         *
+         * @tparam T Middleware class
+         */
         template<class T>
         void middleware() {
             static_assert(std::is_base_of<Middleware, T>::value, "middleware(): type must be a Middleware");
             middlewares.push_back(new T());
         }
 
+        /**
+         * @brief Continue execution of the middleware pipeline.
+         *
+         * @note Should be called from middlewares if you want the pipeline to continue.
+         *
+         * @param request
+         * @return response
+         */
         http::Response next(const http::Request &request);
 
         /**