Method
Cog.PrefixRoutesHandler.mount
Declaration [src]
gboolean
cog_prefix_routes_handler_mount (
CogPrefixRoutesHandler* self,
const char* path_prefix,
CogRequestHandler* handler
)
Description [src]
Adds a route to the handler.
Configures a route which matches path_prefix
in URI paths, and dispatches
requests to a given handler
. The path_prefix
must contain a leading
slash character (/
).
Parameters
path_prefix |
const char* |
URI path prefix to match |
|
Ownership is not transferred to the callee | |
The string is a NUL terminated UTF-8 string | |
handler |
CogRequestHandler |
a request handler for the matched prefix |
|
Ownership is not transferred to the callee |