MCPcopy Create free account
hub / github.com/bcndev/bytecoin / worker_http_request

Function worker_http_request

src/http/Server.cpp:45–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43} // namespace http
44
45void 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
58EMSCRIPTEN_BINDINGS(my_module2) { emscripten::function("worker_http_request", &worker_http_request); }
59

Callers

nothing calls this directly

Calls 1

global_requestMethod · 0.80

Tested by

no test coverage detected