W3cubDocs

/Dart 2

contentLength property

int contentLength

Returns the content length of the response body. Returns -1 if the size of the response body is not known in advance.

If the content length needs to be set, it must be set before the body is written to. Setting the content length after writing to the body will throw a StateError.

Implementation

int get contentLength;

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-io/HttpClientResponse/contentLength.html