use method
Register an API handler class
Implementation
void use(String path, ApiHandler handler) {
get(path, (req) => _handleApi(req, handler.get));
post(path, (req) => _handleApi(req, handler.post));
put(path, (req) => _handleApi(req, handler.put));
delete(path, (req) => _handleApi(req, handler.delete));
patch(path, (req) => _handleApi(req, handler.patch));
}