bodyStr property

String get bodyStr

Retrieves the body as a String.

The empty string is returned if there is no body.

Throws a FormatException if the body contains a sequence of bytes that do not represent a UTF-8 encoded code point.

Use bodyBytes to retrieve the body as a sequence of bytes. Use bodyString to interpret the body bytes as a string in an encoding other than UTF-8.

Implementation

String get bodyStr => bodyString(utf8);