[ Version ( since = "0.3" ) ]
public void path (Method method, string path, owned HandlerCallback handler, string? name = null)
Bind a callback to a given method and path.
While Valum.Router.rule can be as well used for exact path matches, this helper is more efficient as it does rely on regex matching under the hood.
method |
flag for allowed HTTP methods |
path |
the path which must be satisfied by the request |
handler |
callback applied on the pair of request and response objects if the method and path are satisfied |