doGet function

dynamic doGet(
  1. String urlAfterBase, {
  2. Map<String, dynamic>? queries,
  3. Map<String, String>? headers,
})

Implementation

doGet(String urlAfterBase, {Map<String, dynamic>? queries, Map<String, String>? headers}) async {
  var uri = Uri.https(base, '/auto/api/$urlAfterBase', queries);
  var js = await http.get(uri, headers: headers);
  var decoded;
  try {
    decoded = jsonDecode(js.body);
  } catch (e) {
    print(e);
  }
  return decoded;
}