get static method
Sends an HTTP GET request.
Implementation
static Future<dynamic> get(String path,
{bool isAuth = false,
bool testMode = false,
Map<String, dynamic>? query,
Map<String, String>? headers,
CancelToken? cancelToken,
ResponseType responseType = ResponseType.map_data,
Function(int, int)? onReceiveProgress,
bool ignoreOnAllError = false,
int urlIndex = 0}) async {
String error = _checkBeforeRequest(isAuth, urlIndex);
if (error.isNotEmpty) {
throw APIException(-1, body: error);
}
bool isUrl = path.startsWith('http');
return await DioApiST.instance.request(
type: 'GET',
method: !isUrl ? path : null,
baseUrl: isUrl ? path : null,
isAuth: isAuth,
testMode: testMode,
headers: headers,
responseType: responseType,
cancelToken: cancelToken,
queries: query,
//data: query,
onReceiveProgress: onReceiveProgress,
ignoreOnAllError: ignoreOnAllError,
urlIndex: urlIndex);
}