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