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

cancelRequests({required CancelToken token}) → void
delete(bool isDefault, String path, {dynamic data, Map<String, dynamic>? params, Options? options, CancelToken? cancelToken}) Future
get(bool isDefault, String path, {dynamic data, Map<String, dynamic>? params, Options? options, CancelToken? cancelToken, bool refresh = false, bool noCache = !BaseHttpConstant.CACHE_ENABLE, String? cacheKey, bool cacheDisk = false}) Future
getUUID() String
init({bool? isDebug, required bool isDev, required bool isAbroad, BaseOptions? baseOptions, List<Interceptor>? interceptors}) → void
初始化 isDebug 是否开启debug模式 isDev 是否是测试环境 isAbroad 是否是国外环境 baseOptions DIO自定义基础配置
patch(bool isDefault, String path, {dynamic data, Map<String, dynamic>? params, Options? options, CancelToken? cancelToken}) Future
post(bool isDefault, String path, {dynamic data, Map<String, dynamic>? params, Map<String, dynamic>? headers, Options? options, CancelToken? cancelToken}) Future
put(bool isDefault, String path, {dynamic data, Map<String, dynamic>? params, Options? options, CancelToken? cancelToken}) Future