extract method
Produces the value, or the rejection that stops the handler.
Implementation
@override
Future<Result<T, Rejection>> extract(Request request) async {
final raw = request.url.queryParameters[key];
if (raw == null) {
if (null is T) return Ok(null as T);
return Err(Rejection.badRequest('query "$key" is required'));
}
return coerce<T>(raw, source: 'query "$key"');
}