previewBytes method
Implementation
String? previewBytes(
List<int> bytes, {
Map<String, String> headers = const <String, String>{},
}) {
if (!captureBodies || bytes.isEmpty) return null;
final value = utf8
.decode(bytes, allowMalformed: true)
.replaceAll('\u0000', '');
if (!redact) return value;
return _redactor.body(value, contentType: _redactor.contentType(headers));
}