HttpResponseHandler class

Handler for HttpInterceptor.onResponse.

Call next to pass the response to the next interceptor in the chain (possibly replacing it with a different response), resolve to skip all remaining interceptors and return this response immediately, or reject to convert the response into an error.

A replacement response must not derive its body from the original response's stream. Once the chain returns a different response instance, the original body is canceled to release its connection, and reading a stream derived from it throws a StateError.

.create() is for internal use by the package only.

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

next(HttpResponseData response) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reject(Object error, [StackTrace? stackTrace]) → void
resolve(HttpResponseData response) → void
toString() String
A string representation of this object.
inherited

Operators

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