RequestContext class

Snapshot of a request at the moment it enters the interceptor chain.

Constructors

RequestContext({required Uri uri, required String method, required Map<String, String> headers, Object? body, Map<String, dynamic>? extra})

Properties

body → Object?
The serialised request body, or null for body-less verbs.
final
extra → Map<String, dynamic>
Arbitrary bag that flows through the whole chain.
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
Mutable headers — interceptors may add / remove entries freely.
final
method → String
HTTP method string, e.g. "GET".
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
uri → Uri
Fully resolved URL (base + path + query string).
final

Methods

copyWith({Uri? uri, String? method, Map<String, String>? headers, Object? body, Map<String, dynamic>? extra}) → RequestContext
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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