Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Stroika::Frameworks::WebServer::Router Class Reference

#include <Router.h>

Inheritance diagram for Stroika::Frameworks::WebServer::Router:
Stroika::Frameworks::WebServer::Interceptor

Public Member Functions

nonvirtual Iterator< tuple< RequestHandler, Sequence< String > > > Lookup (const Request &request) const
 
- Public Member Functions inherited from Stroika::Frameworks::WebServer::Interceptor
 Interceptor ()=delete
 
nonvirtual void HandleFault (Message &m, const exception_ptr &e) const noexcept
 
nonvirtual void HandleMessage (Message &m) const
 
nonvirtual bool operator== (const Interceptor &rhs) const
 

Detailed Description

If there is not an EXPLICIT route matched for HEAD, or OPTIONS: those methods are implemented automatically by the Router.

Note
Thread-Safety C++-Standard-Thread-Safety-For-Envelope-Letter-Internally-Synchronized But note that HandleMessage() is a const method, so it can safely be called from any number of threads simultaneously.

Definition at line 159 of file Router.h.

Member Function Documentation

◆ Lookup()

Iterator< tuple< RequestHandler, Sequence< String > > > Router::Lookup ( const Request request) const

typically just examine host-relative part of URL, routes CAN examine any part of the request; typically returns just one handler (and matched strings), but can return multiple.

Note
before Stroika v3.0d12 - this returned optional<RequestHandler>, but now returns Iterator<RequestHandler> - all matching routes (but lazy evaluated).

Definition at line 297 of file Router.cpp.


The documentation for this class was generated from the following files: