get function
发送GET请求并解析远程服务器返回的result对应的实体类型
baseUrl: 主机地址 path: 请求路径 queryParameters: URL携带请求参数 connectTimeout: 超时时间 validResult: 是否检验返回结果 autoLoading: 展示Loading
Implementation
Future<Result> get(
{String? baseUrl,
String path = '',
Map<String, dynamic>? queryParameters,
Duration? connectTimeout,
BaseCancelToken? cancelToken,
bool validResult = true,
bool autoLoading = false}) async {
return request(
baseUrl: baseUrl,
path: path,
queryParameters: queryParameters,
options: Options(method: 'get'),
connectTimeout: connectTimeout,
cancelToken: cancelToken,
validResult: validResult,
autoLoading: autoLoading);
}