uvhttp_router.h
Functions
uvhttp_router_new(uvhttp_router_t **router)
Create new Router.
Parameters:
router: Output parameter, used to receive Router pointer
Returns: UVHTTP_OK on success, other values indicate failure
Note: On success, *router is set to a valid Router object, must be freed using uvhttp_router_free Note: On failure, *router is set to NULL
uvhttp_router_free(uvhttp_router_t *router)
Return Type: void
uvhttp_router_add_route(uvhttp_router_t *router, const char *path, uvhttp_request_handler_t handler)
uvhttp_router_add_route_method(uvhttp_router_t *router, const char *path, uvhttp_method_t method, uvhttp_request_handler_t handler)
uvhttp_router_find_handler(const uvhttp_router_t *router, const char *path, const char *method)
uvhttp_router_add_binary_route(uvhttp_router_t *router, const char *path, const char *mime_type, const void *data, size_t data_len)
uvhttp_router_match(const uvhttp_router_t *router, const char *path, const char *method, uvhttp_route_match_t *match)
uvhttp_parse_path_params(const char *path, uvhttp_param_t *params, size_t *param_count)
uvhttp_method_from_string(const char *method)
uvhttp_method_to_string(uvhttp_method_t method)
Return Type: const char *