Network class

Constructors

Network()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelAllRequest() Future<String?>
取消所有HTTP请求
cancelRequestWithURL(Map<String, String> map) Future<String?>
取消指定URL的HTTP请求
closeLog() Future<String?>
关闭日志打印,默认关闭
downloadWithURL(Map<String, dynamic> map) Future<String?>
下载文件
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openLog() Future<String?>
开启日志打印 (Debug级别)
reachabilityStatusChangeBlock() Future<String?>
网络监听
requestWithMethod(Map<String, dynamic> map) Future<String?>
发起网络请求
setHTTPHeaderValue(Map<String, dynamic> map) Future<String?>
设置请求头
setRequestSerializer(String type) Future<String?>
设置网络请求参数的格式:默认为JSON格式
setResponseSerializer(String type) Future<String?>
设置服务器响应数据格式:默认为JSON格式
setTimeoutInterval(double time) Future<String?>
设置服务器响应时间 默认30s
toString() String
A string representation of this object.
inherited

Operators

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