| 332 | } |
| 333 | |
| 334 | static std::map<std::string, std::string> get_headers(const httplib::Request & req) { |
| 335 | std::map<std::string, std::string> headers; |
| 336 | for (const auto & [key, value] : req.headers) { |
| 337 | headers[key] = value; |
| 338 | } |
| 339 | return headers; |
| 340 | } |
| 341 | |
| 342 | // using unique_ptr for request to allow safe capturing in lambdas |
| 343 | using server_http_req_ptr = std::unique_ptr<server_http_req>; |