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