any<T> method

MethodRouter any<T>(
  1. Endpoint<T> endpoint, {
  2. int status = 200,
})

Adds an endpoint for every method no other handler claims.

The counterpart to axum's any and shelf_router's all. A method with its own handler still wins, so get(read).any(rest) sends GET to read and everything else to rest.

Implementation

MethodRouter any<T>(Endpoint<T> endpoint, {int status = 200}) =>
    on(Route.anyMethod, endpoint, status: status);