NetworkExport

Exports captured network transactions. Inputs are NetworkCapture values rather than raw requests, so all output is constrained to the capture pipeline's redacted fields.

Capture-time redaction runs against the policy in effect when the request/response was recorded. Since a policy can change afterwards (e.g. a host adds a new sensitive field name), every export function also accepts an optional RedactionEngine to re-run redaction against the current policy at export time; omitting it preserves the previous capture-only behavior.

One small StringBuilder-append helper per HAR/Postman/cURL fragment (including cookie parsing); splitting the object further would fragment the format logic rather than simplify it.

Functions

Link copied to clipboard
fun toCurl(capture: NetworkCapture, redaction: RedactionEngine? = null): String
Link copied to clipboard
fun toHarTransactions(transactions: List<NetworkTransaction>, redaction: RedactionEngine? = null): String
Link copied to clipboard
fun toPostman(transactions: List<NetworkTransaction>, redaction: RedactionEngine? = null): String

A minimal, valid Postman Collection v2.1 built from the same redacted capture data as toHarTransactions: headers and bodies come straight off NetworkCapture, which has already been through NetworkCaptureFactory's redaction; redaction additionally re-applies the current policy at export time.