HttpUtils class

Constructors

HttpUtils.new()

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

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

Static Methods

cancelRequest(CancelToken token) → void
cancelRequests(CancelToken token) → void
delete(String url, {Map<String, dynamic>? params, dynamic data, Options? options, CancelToken? cancelToken, Function? processFunc}) Future
delete
downloadFile(String urlPath, String savePath, {ProgressCallback? onReceiveProgress, Map<String, dynamic>? queryParameters, CancelToken? cancelToken, bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, dynamic data, Options? options}) Future
get(String url, {Options? options, Map<String, dynamic>? queryParameters, CancelToken? cancelToken}) Future
get请求 headers和超时时长走options // 取消请求(同一个cancel token可以用于多个请求,当一个cancel token取消时,所有使用该cancel token的请求都会被取消)
init({HttpDioConfig? config}) → void
postJson(String url, {Map<String, dynamic>? params, dynamic data, Options? options, CancelToken? cancelToken, bool isNeedAllData = false, Function? sendProcessFunc}) Future
put(String url, {Map<String, dynamic>? params, dynamic data, Options? options, CancelToken? cancelToken, Function? processFunc}) Future
put