RcHttp class

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

download(String url, String savePath, {Options? options, CancelToken? cancelToken, HttpProgress? onReceiveProgress}) Future<bool>
download下载
get<T>(String path, {required FromJson<T> fromJson, required ErrorJson<T> errorJson, Options? options, CancelToken? cancelToken, StringMap? params, bool isPrint = false}) Future<T>
GET请求
HEAD请求
image(String url, {Options? options, CancelToken? cancelToken, HttpProgress? onReceiveProgress}) Future<Uint8List>
image加载
init({required BaseOptions options, OnError? onError, OnRequest? onRequest, OnResponse? onResponse}) Future<void>
HTTP初始化
post<T>(String path, {required FromJson<T> fromJson, required ErrorJson<T> errorJson, StringMap? data, Options? options, CancelToken? cancelToken, bool isPrint = false}) Future<T>
POST请求
setBaseUrl(String url) → dynamic
设置请求地址
upload<T>(String path, {required FormData data, required FromJson<T> fromJson, required ErrorJson<T> errorJson, Options? options, CancelToken? cancelToken, HttpProgress? onSendProgress, bool isPrint = false}) Future<T>
upload上传