HeaderExtractable<T> class final

Extracts one header, coerced to T.

Header names are matched case-insensitively. A nullable T makes the header optional.

Implemented types
Available extensions

Constructors

HeaderExtractable(String name)
Reads the header named name.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The header name.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

extract(Request request) Future<Result<T, Rejection>>
Produces the value, or the rejection that stops the handler.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
require(Request request) Future<T>

Available on FromRequestParts<T>, provided by the RequireExtraction extension

Extracts the value, throwing the Rejection when extraction fails.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited