AjanuwHttpConfig class
Constructors
-
AjanuwHttpConfig({dynamic url, String? method, dynamic body, Map<
String, dynamic> ? params, Map<String, String> ? headers, Duration? timeout, Encoding? encoding, AjanuwHttpProgress? onUploadProgress, AjanuwHttpProgress? onDownloadProgress, List<MultipartFile> ? files, bool validateStatus(int status)?, String paramsSerializer(Map<String, dynamic> params)?, String? baseURL, ResponseType? responseType, Completer? close, List<AjanuwHttpInterceptors?> ? interceptors})
Properties
- baseURL ↔ String?
-
默认地址
getter/setter pair
- body ↔ dynamic
-
String|List
getter/setter pair
- close ↔ Completer?
-
关闭 client,将调用
client.close()
getter/setter pair - encoding ↔ Encoding?
-
getter/setter pair
-
files
↔ List<
MultipartFile> ? -
文件列表
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ Map<
String, String> ? -
getter/setter pair
-
interceptors
↔ List<
AjanuwHttpInterceptors?> ? -
作用于当前请求的拦截器,调用顺序优先于全局的拦截器
getter/setter pair
- method ↔ String?
-
请求方法
getter/setter pair
- onDownloadProgress ↔ AjanuwHttpProgress?
-
监听下载文件进度
getter/setter pair
- onUploadProgress ↔ AjanuwHttpProgress?
-
监听上传文件进度
getter/setter pair
-
params
↔ Map<
String, dynamic> ? -
getter/setter pair
-
paramsSerializer
↔ (String Function(Map<
String, dynamic> params)?) -
自定义params的解析函数
getter/setter pair
- responseType ↔ ResponseType?
-
默认返回Response,但是也可以返回StreamedResponse
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout ↔ Duration?
-
getter/setter pair
- url ↔ dynamic
-
String|Uri
getter/setter pair
- validateStatus ↔ (bool Function(int status)?)
-
允许自定义合法状态码范围
getter/setter pair
Methods
-
merge(
AjanuwHttpConfig other) → AjanuwHttpConfig -
如果当前config的某项为null,则获取
other
里面的值, 并返回一个新的config -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited