read method

  1. @override
Future<String> read(
  1. Uri url, {
  2. Map<String, String>? headers,
})
inherited

Sends an HTTP GET request to the specified url and returns the body as a String.

Implementation

@override
Future<String> read(Uri url, {Map<String, String>? headers}) async {
  var response = await get(url, headers: headers);
  _checkResponseSuccess(url, response);
  return response.readAsString();
}