doGET method

Future doGET(
  1. String url, {
  2. Map<String, String>? headers,
  3. Map<String, dynamic>? query,
})

Implementation

Future doGET(String url, {Map<String, String>? headers, Map<String, dynamic>? query}) async {
  headers = _headers(headers);
  url = _url(url);

  var res = await get(url, headers: headers, query: query);

  if (res.statusCode == 401) {
    if (await _refreshToken()) {
      headers = _headers(headers);
      res = await get(url, headers: headers, query: query);
    }
  }

  return _checkResponse(res);
}