rule->add_param(i.name, i.type == url_component_type::PARAM_UNTIL_END_OF_PATH);
}
}
- _routes.add(rule, operations.method);
+ _cookie = _routes.add_cookie(rule, operations.method);
}
}
set(_routes, new function_handler(f));
}
+void path_description::unset(routes& _routes) const {
+ if (params.size() == 0) {
+ _routes.drop(operations.method, path);
+ } else {
+ auto rule = _routes.del_cookie(_cookie, operations.method);
+ delete rule;
+ }
+}
+
path_description::path_description(const sstring& path, operation_type method,
const sstring& nickname,
const std::vector<std::pair<sstring, bool>>& path_parameters,