| 377 | } |
| 378 | |
| 379 | void server_http_context::get(const std::string & path, const server_http_context::handler_t & handler) const { |
| 380 | pimpl->srv->Get(path_prefix + path, [handler](const httplib::Request & req, httplib::Response & res) { |
| 381 | server_http_req_ptr request = std::make_unique<server_http_req>(server_http_req{ |
| 382 | get_params(req), |
| 383 | get_headers(req), |
| 384 | req.path, |
| 385 | req.body, |
| 386 | req.is_connection_closed |
| 387 | }); |
| 388 | server_http_res_ptr response = handler(*request); |
| 389 | process_handler_response(std::move(request), response, res); |
| 390 | }); |
| 391 | } |
| 392 | |
| 393 | void server_http_context::post(const std::string & path, const server_http_context::handler_t & handler) const { |
| 394 | pimpl->srv->Post(path_prefix + path, [handler](const httplib::Request & req, httplib::Response & res) { |
nothing calls this directly
no test coverage detected