extract method

  1. @override
Future<Result<Map<String, String>, Rejection>> extract(
  1. Request request
)
override

Produces the value, or the rejection that stops the handler.

Implementation

@override
Future<Result<Map<String, String>, Rejection>> extract(
  Request request,
) async {
  return Ok(
    Map<String, String>.unmodifiable({
      for (final entry in request.headers.entries)
        entry.key.toLowerCase(): entry.value,
    }),
  );
}