flutter_axios library
Classes
- AuthInterceptor
- Request interceptor for adding authentication headers
- Axios
- Global Axios instance and convenience methods
- AxiosConfig
- Configuration class for Axios instances
- AxiosInstance
- Axios instance for making HTTP requests
- AxiosJson
- JSON 序列化注解. 标记类需要生成 JSON 映射代码.
- AxiosRequest
- Represents an HTTP request in the Axios style
-
AxiosResponse<
T> - Represents an HTTP response in the Axios style
- DownloadProgress
- 下载进度信息
- ErrorResponseInterceptor
- Response interceptor for handling errors
- HeadersInterceptor
- Request interceptor for adding common headers
- Interceptor
- Base class for all interceptors
- InterceptorManager
- Manager for handling interceptors
- JsonMapper
- JSON 映射器核心类. 管理类型注册和序列化/反序列化.
- LoggingRequestInterceptor
- Request interceptor for logging requests
- LoggingResponseInterceptor
- Response interceptor for logging responses
- RequestInterceptor
- Simple request interceptor that takes a function
- RequestOptions
- Options for making HTTP requests
- ResponseInterceptor
- Simple response interceptor that takes a function
- RetryInterceptor
- Response interceptor for retry logic
- SSEClient
- Server-Sent Events 客户端
- SSEEvent
- Server-Sent Events 事件类
- SSEOptions
- SSE 连接选项
- StreamDownloadOptions
- 流式下载选项
-
StreamedAxiosResponse<
T> - 流式响应类
- WebSocketClient
- WebSocket 客户端
- WebSocketMessage
- WebSocket 消息
- WebSocketOptions
- WebSocket 连接选项
Enums
- AxiosErrorType
- Error types that can occur during HTTP requests
- HttpMethod
- HTTP methods supported by Axios
- WebSocketMessageType
- WebSocket 消息类型
Extensions
- AxiosStreamingExtension on AxiosInstance
- AxiosInstance 的流式扩展
Functions
-
initializeJsonMapper(
) → void - 初始化 JSON 映射器. 必须在使用前调用一次.
Typedefs
-
ErrorInterceptorFunction
= FutureOr<
void> Function(dynamic error) - Error interceptor function type
-
Headers
= Map<
String, String> - Headers type
- ProgressCallback = void Function(int count, int total)
- Progress callback for uploads/downloads
-
QueryParameters
= Map<
String, dynamic> - Query parameters type
- RequestData = dynamic
- Request data type - can be String, Map, List, or any JSON-serializable object
-
RequestInterceptorFunction
= FutureOr<
AxiosRequest> Function(AxiosRequest request) - Request interceptor function type
- ResponseData = dynamic
- Response data type - typically parsed JSON
-
ResponseInterceptorFunction
= FutureOr<
AxiosResponse> Function(AxiosResponse response) - Response interceptor function type
- TransformRequest = dynamic Function(dynamic data, Headers headers)
- Transform request function type
- TransformResponse = dynamic Function(dynamic data, Headers headers)
- Transform response function type
- ValidateStatus = bool Function(int? status)
- Validator function for response status codes
Exceptions / Errors
- AxiosError
- Axios-style error class