contentLength property

  1. @override
int contentLength
inherited

Gets the content length of the request. If the size of the request is not known in advance, the content length should be null.

Implementation

@override
int get contentLength => _encodedQuery.length;
  1. @override
void contentLength=(int? length)
inherited

Sets the content length of the request body. This is only supported in streamed requests since the body may be sent asynchronously after the headers have been sent.

Implementation

@override
set contentLength(int? length) {
  throw UnsupportedError(
      'The content-length of a request cannot be set manually when the request body is known in advance.');
}