RequestInterceptor class

Intercepts a request before it is sent. Return modified headers and data (or null to keep original).

Constructors

RequestInterceptor()
const

Properties

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

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onRequest(String method, String endpoint, {dynamic data, Map<String, String>? headers, bool isMultipart = false}) Future<InterceptedRequest>
Called before each request. Modify and return the request data. Return InterceptedRequest with optional overrides.
toString() String
A string representation of this object.
inherited

Operators

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