getByteBody method
Returns a Uint8List
of the body data.
Useful for small size bodies. For large amounts of data use bodyData stream instead.
Implementation
Future<Uint8List> getByteBody() async =>
Uint8List.fromList(await bodyData.expand((element) => element).toList());