Componet for communication with an API. Includes functionality
for updating tokens if they expired
Set of configurations values for communication with API
The common config for the Dio instance.
dio.options is a instance of
RefreshTokensDelegate that includes base implementation for
token refreshing operations. Override the implementations that
does not fit in your API requirements
You can cancel a request by using a cancel token.
One token can be shared with different requests.
when a token's
cancel method invoked, all requests
with this token will be cancelled.
A powerful Http client for Dart, which supports Interceptors,
Global configuration, FormData, File downloading etc. and Dio is
very easy to use.
Delegate that provides a set methods for controlling
the process of error handling through all requests
Handler for error interceptor.
A class to create readable "multipart/form-data" streams.
It can be used to submit forms and file uploads to http server.
HttpAdapter is a bridge between Dio and HttpClient.
Dio instance may have interceptor(s) by which you can intercept
requests/responses/errors before they are handled by
Interceptors are a queue, and you can add any number of interceptors,
All interceptors will be executed in first in first out order.
InterceptorsWrapper is a helper class, which is used to conveniently
ListParam < T>
Add lock/unlock API for interceptors.
LogInterceptor is used to print logs during network requests.
It's better to add LogInterceptor to the tail of the interceptor queue,
otherwise the changes made in the interceptor behind A will not be printed out.
This is because the execution of interceptors is in the order of addition.
A file to be uploaded as part of a
MultipartRequest. This doesn't need to
correspond to a physical file.
Every request can pass an
Options object which will be merged with Dio.options
Serialize the request/response/error before they enter the interceptor.
QueuedInterceptorsWrapper is a helper class, which is used to conveniently
Delegete that provide a set methods for controlling
the process of refreshing authorisation tokens
Handler for request interceptor.
Response < T>
Response describes the http Response info.
Handler for response interceptor.
Component for secure authorization tokens storage
Transformer allows changes to the request/response data before
it is sent/received to/from the server.
ListFormat specifies the array format
(a single parameter with multiple parameter or multiple parameters with the same name)
and the separator for array items.
ResponseType indicates which transformation should
be automatically applied to the response data by Dio.