contentLength property

  1. @override
FutureOr<int> contentLength
latefinal

The request's content length.

It is recommended to check hasContentLength first for large requests, since calling this getter will result in reading the request's full body if the content length is not known statically.

Implementation

@override
late final FutureOr<int> contentLength = (_contentLength ??
        split().fold<int>(0, (length, el) => length + el.length))
    as FutureOr<int>;