HarContentExtensions Class
Provides helper methods for working with HAR response content payloads.
public static class HarContentExtensionsMethods
| Name | Description |
|---|---|
| TryGetRawData(HarContent?, byte[]?) | Gets the raw payload bytes represented by the HAR content. |
TryGetRawData(HarContent?, byte[]?)
HarContentExtensions.csGets the raw payload bytes represented by the HAR content.
public static bool TryGetRawData(this HarContent? content, out byte[]? rawData)Parameters
contentHarContent?- The HAR content.
rawDatabyte[]?- The decoded raw bytes if available.
Returns
bool true when payload bytes are available; otherwise, false. Returns false when the text is not valid for the declared HarContent.Encoding, or when that encoding is not understood, rather than reporting the undecoded text as the payload.