Register handler for prefix. If multiple handlers match a prefix, the first-registered one will be invoked.
Declared in <httpserver.h>
void
RegisterHTTPHandler(
std::string const& prefix,
bool exactMatch,
HTTPRequestHandler const& handler);
| Name | Description |
|---|---|
| prefix | The URI path prefix the handler responds to. |
| exactMatch | If true, only a request whose path equals prefix matches; otherwise any path starting with prefix matches. |
| handler | The callback invoked for matching requests. |