getURLAsString function

FutureOr<String?> getURLAsString(
  1. String url, {
  2. HttpClient? client,
  3. String? method,
})

Implementation

FutureOr<String?> getURLAsString(String url,
    {HttpClient? client, String? method}) {
  var response = getURL(url, client: client, method: method);
  return response.then((response) => response.bodyAsString,
      onError: (e) => null);
}