PlexInterceptor class abstract

Interceptor for HTTP requests and responses.

Add via PlexNetworking.addInterceptor. Interceptors run in order:

  • onRequest before each request (can modify headers)
  • onResponse after each response (can modify or replace response)
  • onError when an exception occurs (can return a custom error response)
Implementers

Constructors

PlexInterceptor()

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
onError(Object error, StackTrace stack) Future<PlexApiResponse>
Called when an exception occurs. Return a PlexApiResponse (typically PlexError).
onRequest(String url, Map<String, String> headers) Future<Map<String, String>>
Called before the request is sent. Return modified headers.
onResponse(PlexApiResponse response) Future<PlexApiResponse>
Called after the response is received. Return the (possibly modified) response.
toString() String
A string representation of this object.
inherited

Operators

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