$darkmode
Public Member Functions | |
| std::shared_ptr< OutgoingResponse > | handle (const std::shared_ptr< IncomingRequest > &request) override |
| void | add (const std::string &key, cloe::Handler h) |
| std::vector< std::string > | endpoints () const |
| fable::Json | endpoints_to_json (const std::vector< std::string > &endpoints) const |
The GreedyHandler is a stop-gap till we refactor the server code.
Instead of it handling a single route, it handles all routes, hence the name.
HttpRequestHandler defines several typedefs which are used within this class, such as OutgoingResponse and IncomingRequest.
|
inline |
Add a handler for a specific endpoint.
|
inline |
Return a list of all registered endpoints.
|
inline |
Return endpoint data in json format.
|
inlineoverride |
Handle every request from the server.
Every single request that passes through the server has to go through this handler. If the muxer has an endpoint that matches the request, then it gets passed through. The muxer has a default endpoint, so the nominal case is that every request is passed to some handler from the muxer.