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 reason phrase after writing to the body will throw a StateError.

Source

int get contentLength;

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