| 346 | } |
| 347 | |
| 348 | void ClientRunner::receive_http_request(http::HttpCallback::RequestType request_type, |
| 349 | std::vector<std::pair<std::string, std::string>> headers, std::string path, |
| 350 | std::vector<std::pair<std::string, std::string>> args, std::string body, |
| 351 | std::unique_ptr<http::HttpRequestCallback> answer_callback) { |
| 352 | if (path == "/v1/models") { |
| 353 | if (body.size() != 0) { |
| 354 | http_send_static_answer(400, "bad request", std::move(answer_callback)); |
| 355 | return; |
| 356 | } |
| 357 | run_get_models_request(std::move(answer_callback)); |
| 358 | return; |
| 359 | } |
| 360 | |
| 361 | run_http_request(request_type, std::move(headers), std::move(path), std::move(args), std::move(body), |
| 362 | std::move(answer_callback)); |
| 363 | } |
| 364 | |
| 365 | /* |
| 366 | * |
nothing calls this directly
no test coverage detected