contentLength property

int 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;
void contentLength= (int value)
override

Implementation

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