readText method

Future<String> readText({
  1. int maxBytes = 10 * 1024 * 1024,
  2. Encoding encoding = utf8,
})

Reads the body as text using encoding.

Implementation

Future<String> readText({
  int maxBytes = 10 * 1024 * 1024,
  Encoding encoding = utf8,
}) async => encoding.decode(await readBytes(maxBytes: maxBytes));