| 321 | } |
| 322 | |
| 323 | static std::map<std::string, std::string> get_params(const httplib::Request & req) { |
| 324 | std::map<std::string, std::string> params; |
| 325 | for (const auto & [key, value] : req.params) { |
| 326 | params[key] = value; |
| 327 | } |
| 328 | for (const auto & [key, value] : req.path_params) { |
| 329 | params[key] = value; |
| 330 | } |
| 331 | return params; |
| 332 | } |
| 333 | |
| 334 | static std::map<std::string, std::string> get_headers(const httplib::Request & req) { |
| 335 | std::map<std::string, std::string> headers; |