protected override async Task Handle(StringBuilder contentBuilder) { if (contentBuilder.Length > 0) { return; } if (_httpContent.IsDisposed()) { contentBuilder.AppendLine(); contentBuilder.AppendLine(ContentFormatterOptions.WarningMessageWhenDisposed); return; } var content = await _httpContent.SafeReadAsStringAsync(); var contentLength = _httpContent.Headers.ContentLength; if (contentLength >= ContentFormatterOptions.MaximumReadableBytes) { contentBuilder.AppendLine(); contentBuilder.AppendLine(ContentFormatterOptions.WarningMessageWhenContentIsTooLarge); content = content.Substring(ContentFormatterOptions.MaximumPrintableBytes); } contentBuilder.Append(content); }