MCBaseRequest<T> class Null safety

Constructors

MCBaseRequest()

Properties

delegate MCRequestDelegate?
read / write
dio Dio
read / write
dioError DioError?
read / write
failure MCRequestCallback?
失败回调
read / write
hashCode int
The hash code for this object.
read-onlyinherited
onReceiveProgress ProgressCallback?
接收进度
read / write
onSendProgress ProgressCallback?
发送进度
read / write
response Response?
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
success MCRequestCallback?
成功回调
read / write

Methods

addAccessory(MCRequestAccessory accessory) → void
baseUrl() String
请求base host
clearCompletionBlock() → void
connectTimeout() int
链接超时时间
contentType() String
请求的Content-Type,默认值是"application/json; charset=utf-8". 如果您想以"application/x-www-form-urlencoded"格式编码请求数据, 可以设置此选项为 Headers.formUrlEncodedContentType, 这样Dio 就会自动编码请求体.
customInterceptorAdd() → dynamic
如果需要自定义添加一些拦截器可以重写该方法 如果添加cookie dio.interceptors.add(CookieManager(cookieJar));
isLog() bool
是否打印调试信息
mock() → dynamic
mock数据
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
receiveTimeout() int
接受超时时间
requestArgument() → dynamic
请求参数
requestCompleteFilter() → void
请求fuction返回之前执行
requestMethod() MCRequestMethod
请求类型
requestUrl() String?
请求URL
responseType() ResponseType
responseType 表示期望以那种格式(方式)接受响应数据。 目前 ResponseType 接受三种类型 JSON, STREAM, PLAIN.
savePath() String
下载地址
sendTimeout() int
发送超时时间
setHeader() Map<String, String>
header 返回
start() Future?
startWithCompletionBlockWithSuccess(MCRequestCallback success, MCRequestCallback failure) → void
stop() → void
停止请求
toString() String
A string representation of this object.
inherited

Operators

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