readBody method

  1. @override
Future<Uint8List>? readBody(
  1. HttpRequest req,
  2. int max
)
override

NativeRequest.readBody puts the parts of a big body in one buffer of native memory, so a big body is no big list on the Dart heap.

Implementation

@override
Future<Uint8List>? readBody(HttpRequest req, int max) =>
    req is NativeRequest ? _readNative(req, max) : null;