APIXDioMixin<X> mixin
- Superclass constraints
- Mixin applications
Properties
- bodyFormat → BodyFormat?
-
请求体格式
no setterinherited
- config → APIConfig
-
全局配置
no setterinherited
- contentType → String?
-
Content-Type
no setterinherited
- data → Object?
-
请求体 默认 null
no setterinherited
- dio → Dio
-
no setter
- extra → Parameters?
-
额外参数
no setterinherited
- followRedirects → bool?
-
跟随重定向
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers → HTTPHeader?
-
请求头 默认 null
no setterinherited
- listFormat → ListFormat?
-
数组格式
no setterinherited
- maxRedirects → int?
-
最大重定向次数
no setterinherited
- method → HTTPMethod
-
请求方式 默认 GET
no setterinherited
- options → Options?
-
请求配置
no setterinherited
- parameters → Parameters?
-
请求参数 默认 null
no setterinherited
- path → String
-
请求路径 默认 null
no setterinherited
- persistentConnection → bool?
-
持久化连接
no setterinherited
- prefixPath → String
-
跟随主域名后面的前缀
no setterinherited
- preserveHeaderCase → bool?
-
保留 Header 大小写
no setterinherited
- receiveDataWhenStatusError → bool?
-
状态错误时是否接收数据
no setterinherited
- receiveTimeout → Duration?
-
接收超时时间
no setterinherited
- requestEncoder → RequestEncoder?
-
请求编码
no setterinherited
- responseDecoder → ResponseDecoder?
-
响应解码
no setterinherited
- responseType → ResponseType?
-
响应类型
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendTimeout → Duration?
-
发送超时时间
no setterinherited
- suffixPath → String
-
跟随主域名后面的后缀
no setterinherited
- url → String
-
请求 url, 由 prefixPath、path 和 suffixPath 组成
no setterinherited
- useBody → bool
-
是否将 parameters 转成 data 放入 Request Body 中,默认不放入请求体中
no setterinherited
- validateStatus → ValidateStatus?
-
请求状态校验
no setterinherited
Methods
-
cacheInterceptors(
{bool isCached = true}) → void -
loggerInterceptors(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rawFetch(
{String? url, HTTPMethod? method, Object? data, Parameters? queryParameters, CancelToken? cancelToken, Options? options, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, bool? useBody, BodyFormat? bodyFormat, bool isCached = true}) → Future< X?> -
rawRequest(
{String? url, HTTPMethod? method, Object? data, Parameters? queryParameters, CancelToken? cancelToken, Options? options, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, bool? useBody, BodyFormat? bodyFormat, bool isCached = true}) → Future< Response< X> > -
发送请求
参数优先级高于默认配置
如果设置了
options
, 则method
无效, 只会替换默认的 APIOptions.options 中的method
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited