| 352 | } |
| 353 | |
| 354 | static std::map<std::string, std::string> get_params(const httplib::Request & req) { |
| 355 | std::map<std::string, std::string> params; |
| 356 | for (const auto & [key, value] : req.params) { |
| 357 | params[key] = value; |
| 358 | } |
| 359 | for (const auto & [key, value] : req.path_params) { |
| 360 | params[key] = value; |
| 361 | } |
| 362 | return params; |
| 363 | } |
| 364 | |
| 365 | static std::map<std::string, std::string> get_headers(const httplib::Request & req) { |
| 366 | std::map<std::string, std::string> headers; |