headUri<T> method
Implementation
Future<BaseModel> headUri<T>(
Uri uri, {
Object? data,
dynamic tag,
bool? loading,
bool dataToJson = true,
Options? options,
CancelToken? cancelToken,
}) async {
assert(_singleton != null, '请先调用 initialize');
if (hasNetWork) return notNetWorkModel;
_addLoading(loading);
data = baseDioOptions.extraUriData?.call(uri, data) ?? data;
uri = baseDioOptions.extraUri?.call(uri) ?? uri;
final res = await dio.headUri<T>(uri,
options: _mergeOptions(options, uri.path),
cancelToken: cancelToken,
data: dataToJson ? jsonEncode(data) : data);
return _response(res, tag);
}