readBytesFromResponse static method

Future<List<int>> readBytesFromResponse(
  1. HttpClientResponse response
)

Reads the entire response as a list of bytes.

Implementation

static Future<List<int>> readBytesFromResponse(
  HttpClientResponse response,
) async {
  return await response.fold([], (a, b) {
    a.addAll(b);
    return a;
  });
}