MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / dispatch_request

Method dispatch_request

examples/server/httplib.h:6311–6323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6309}
6310
6311inline bool Server::dispatch_request(Request &req, Response &res,
6312 const Handlers &handlers) {
6313 for (const auto &x : handlers) {
6314 const auto &matcher = x.first;
6315 const auto &handler = x.second;
6316
6317 if (matcher->match(req)) {
6318 handler(req, res);
6319 return true;
6320 }
6321 }
6322 return false;
6323}
6324
6325inline void Server::apply_ranges(const Request &req, Response &res,
6326 std::string &content_type,

Callers

nothing calls this directly

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected