std :: http::router
Struct std::HttpCtx
struct HttpCtx {
&HttpConn conn;
struct Vec<struct RouteParam> params;
int route_index;
long long start_ns;
}Per-request context passed to route handlers and middleware.
Fields
the connection (peer, keep-alive, detach)
index of the matched route, -1 if none
when dispatch began (monotonic clock)
Methods
A captured path parameter (":name" / "name"; "" for a bare wildcard), percent-decoded, or null.
The pattern of the matched route ("" if none).