[#RegisterHTTPHandler]
= RegisterHTTPHandler
:mrdocs:

Register handler for prefix&period; If multiple handlers match a prefix, the first&hyphen;registered one will be invoked&period;

== Synopsis

Declared in `&lt;httpserver&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
RegisterHTTPHandler(
    std::string const& prefix,
    bool exactMatch,
    xref:HTTPRequestHandler.adoc[HTTPRequestHandler] const& handler);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *prefix*
| The URI path prefix the handler responds to&period;
| *exactMatch*
| If true, only a request whose path equals prefix matches&semi; otherwise any path starting with prefix matches&period;
| *handler*
| The callback invoked for matching requests&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
