contentLength property

  1. @override
int? contentLength
override

Gets and sets the content-length of the request, in bytes. If the size of the request is not known in advance, set this to null.

Implementation

@override
int? get contentLength {
  final length = headers['content-length'];
  return length != null ? int.parse(length) : null;
}