Function get
fn get<H, T, S>(handler: H) -> MethodRouter<S, Infallible>
where
H: Handler<T, S>,
T: 'static,
S: Clone + Send + Sync + 'static
Route GET requests to the given handler.
Example
use ;
async
// Requests to `GET /` will go to `handler`.
let app = new.route;
# let _: Router = app;
Note that get routes will also be called for HEAD requests but will have
the response body removed. Make sure to add explicit HEAD routes
afterwards.