getString method
Implementation
Future<String> getString(
dynamic url, {
Map<String, String> headers = const {},
bool validate = true,
}) async {
final response =
await get(url is String ? Uri.parse(url) : url, headers: headers);
if (_closed) throw HttpClientClosedException();
if (validate) {
_validateResponse(response, response.statusCode);
}
return response.body;
}