get method
Implementation
Future<dynamic> get({
required String url,
Map<String, dynamic>? queryParams,
Map<String, String>? headers,
}) async {
// await ConnectionManager.readyToExecuteAPIRequest(force: bypassAuth);
final uri = Uri(
scheme: isLocal ? 'http' : 'https',
host: baseUrl,
path: url,
queryParameters: _convertQueryParams(queryParams),
);
final request = http.Request('GET', uri);
request.headers.addAll(commonHeaders());
request.headers.addAll(headers ?? {});
logger.i('API request $url with headers ${request.headers}');
final res = await request.send();
final result = await http.Response.fromStream(res);
return _response(result);
}