MCBaseRequest<T> class abstract

Constructors

MCBaseRequest()

Properties

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

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 nonexistent 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