Future<String> readAsString([Encoding encoding])

Returns a Future containing the body as a String.

If encoding is passed, that's used to decode the body. Otherwise the encoding is taken from the Content-Type header. If that doesn't exist or doesn't have a "charset" parameter, UTF-8 is used.

This calls read internally, which can only be called once.

Source

Future<String> readAsString([Encoding encoding]) {
  if (encoding == null) encoding = this.encoding;
  if (encoding == null) encoding = UTF8;
  return encoding.decodeStream(read());
}