registerFunction<TResponse, TRequest extends Request<TResponse> > method
void
registerFunction<TResponse, TRequest extends Request<TResponse> >(
- FutureOr<
TResponse> handler(- TRequest
Registers the given handler
.
This will create a function based request handler.
See RequestHandler.function
.
Implementation
void registerFunction<TResponse, TRequest extends Request<TResponse>>(
FutureOr<TResponse> Function(TRequest) handler,
) {
register(RequestHandler.function(handler));
}