Skip to main content

write_captured_har_entry

Function write_captured_har_entry 

pub async fn write_captured_har_entry<W>(
    writer: &mut W,
    capture: &ExchangeCapture,
    extension: &impl HarEntryExtension,
) -> Result<(), Box<dyn Error + Sync + Send>>
where W: AsyncWrite + Unpin + Send,
Available on crate features http and inspect and std only.
Expand description

Write one HAR entry directly to an asynchronous destination. Body memory is bounded independently of capture size. A first pass determines UTF-8 encoding; the second streams the same pinned record prefix. Cancellation may leave a partial entry in the destination; callers publishing files should stage them.