contentLength property

  1. @override
int get contentLength
override

The size of the request body, in bytes. This is calculated from bodyBytes.

The content length cannot be set for Request, since it's automatically calculated from bodyBytes.

Implementation

@override
int get contentLength => bodyBytes.length;
  1. @override
set contentLength (int? value)
override

Implementation

@override
set contentLength(int? value) {
  throw UnsupportedError('Cannot set the contentLength property of '
      'non-streaming Request objects.');
}