EasyDio class

Constructors

EasyDio()
factory

Properties

dio Dio
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
publicErrorCode List<String>
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

changeBaseUrl(String baseUrl) → void
修改默认url
download({String urlPath = '', String savePath = '', bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, ProgressCallback onReceiveProgress, dynamic data, Map<String, dynamic> queryParameters, CancelToken cancelToken, Options options, Function onStart, Function onError, Function onFinish, bool publicMethod = true}) → void
-----------------------------------------下载文件方法封装-------------------------------------------------------------
filesUpload({List<MultipartFile> multipartFile, String url, String filePath, String key = 'file', String fileName, FormData formData, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress, Function onStart, Function onError, Function onFinish, bool publicMethod = false}) Future<HttpData>
fileUpload({MultipartFile multipartFile, String url, String filePath, String key = 'file', String fileName, FormData formData, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress, Function onStart, Function onError, Function onFinish, dynamic handleRes(Map map), bool publicMethod = false}) Future<HttpData>
-----------------------------------------上传文件方法封装-------------------------------------------------------------
init({String baseUrl, int connectTimeout, int receiveTimeout, String pem, String pKCSPath, String pKCSPwd, String codeKey = 'code', String msgKey = 'msg', String dataKey = 'data', String successCode = '0', ResponseType responseType, bool openLog = true, int retry = 3, String method, Map<String, dynamic> headers, Map<String, dynamic> extra, String contentType, ValidateStatus validateStatus, bool followRedirects, Function onError, Function onFinish, Function onStart, ValidateResponse validateResponse, bool enableAutoCookie = false, ListFormat listFormat, List<String> publicErrorCode, List<Interceptor> interceptors}) → void
初始化公共属性 [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeHeaders(String key) → void
request<T>({String url, String method, Options options, String cacheKey, bool isFormData, bool publicMethod, dynamic data, String contentType, CancelToken cancelToken, Function onStart, dynamic onSuccess(HttpData<T> httpData), dynamic onError(HttpData httpData), Function onFinish, ValidateResponse validateResponse, String successCode, String codeKey, String msgKey, String dataKey, bool checkDataEmpty = true, ProgressCallback onReceiveProgress, ProgressCallback onSendProgress, dynamic handleRes(dynamic map), HttpError validateError(dynamic data)}) Future<HttpData<T>>
-----------------------------------------请求方法封装-------------------------------------
requestList<T, E>({String url, String method, Options options, String cacheKey, bool isFormData, bool publicMethod, dynamic data, String contentType, CancelToken cancelToken, Function onStart, dynamic onSuccess(HttpData<T> httpData), dynamic onError(HttpData httpData), Function onFinish, ValidateResponse validateResponse, String successCode, String codeKey, String msgKey, String dataKey, bool checkDataEmpty = true, ProgressCallback onReceiveProgress, ProgressCallback onSendProgress, dynamic handleRes(dynamic map), HttpError validateError(dynamic data)}) Future<HttpData<T>>
setCookie(String cookie) → void
-----------------------------------------dio部分设置-------------------------------------
setHeaders(Map<String, dynamic> headers) → void
toString() String
A string representation of this object. [...]
inherited

Operators

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