bodyAsString property
String?
get
bodyAsString
Get body as string (assumes UTF-8 encoding)
Implementation
String? get bodyAsString {
if (body == null) return null;
try {
return utf8.decode(body!);
} catch (e) {
_logger.warning('Failed to decode body as UTF-8: $e');
return null;
}
}