MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / get

Method get

subprojects/llama.cpp/tools/server/server-http.cpp:379–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void 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
393void 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) {

Callers

nothing calls this directly

Calls 3

get_paramsFunction · 0.85
get_headersFunction · 0.85
process_handler_responseFunction · 0.85

Tested by

no test coverage detected