MCPcopy Create free account
hub / github.com/chrxh/alien / dispatch_request

Method dispatch_request

external/cpp-httplib/httplib.h:5578–5590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5576 }
5577
5578 inline bool Server::dispatch_request(Request& req, Response& res,
5579 const Handlers& handlers) {
5580 for (const auto& x : handlers) {
5581 const auto& pattern = x.first;
5582 const auto& handler = x.second;
5583
5584 if (std::regex_match(req.path, req.matches, pattern)) {
5585 handler(req, res);
5586 return true;
5587 }
5588 }
5589 return false;
5590 }
5591
5592 inline void Server::apply_ranges(const Request& req, Response& res,
5593 std::string& content_type,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected