| 43 | } // namespace http |
| 44 | |
| 45 | void worker_http_request(emscripten::val cb, size_t handle, std::string method, std::string uri, std::string body) { |
| 46 | // std::cout << "worker_http_request " << handle << std::endl; |
| 47 | |
| 48 | auto next_client = std::make_unique<http::Client>(std::move(cb), handle); |
| 49 | http::RequestBody req; |
| 50 | req.r.http_version_major = 1; |
| 51 | req.r.http_version_minor = 1; |
| 52 | req.r.method = std::move(method); |
| 53 | req.r.uri = std::move(uri); |
| 54 | req.body = std::move(body); |
| 55 | global_server->global_request(std::move(next_client), std::move(req)); |
| 56 | } |
| 57 | |
| 58 | EMSCRIPTEN_BINDINGS(my_module2) { emscripten::function("worker_http_request", &worker_http_request); } |
| 59 |
nothing calls this directly
no test coverage detected