body property

String body
latefinal

Response body decoded as UTF-8, computed once.

Malformed sequences become the replacement character rather than throwing, so a binary body can still be printed by a failing assertion. Compare bytes through bodyBytes instead of asserting on that text.

Implementation

late final String body = utf8.decode(bodyBytes, allowMalformed: true);