Table of Contents

Export to HTTP Archive format

Fluxzy supports native exporting to the HTTP Archive format (HAR). The HTTP Archive format is a JSON-formatted archive file format for logging of a web browser's interaction with a site. The common extension for these files is .har.

You can use the Packager helper class to export the capture session to a HAR file.

The following example shows how to begin a capture session and export the result as a HAR file.

using Fluxzy;

var tempDirectory = "/path/to/temp/directory";

var fluxzySetting = FluxzySetting.CreateDefault();


// Create a new proxy instance 
await using (var proxy = new Proxy(fluxzySetting))
    // Connect to client to proxy

    Console.WriteLine("Press any key to exit");

Packager.ExportAsHttpArchive(tempDirectory, "export.har");

The code below set tempDirectory as the temporary output directory.


Then at the end of the capture session, the code below export the capture session to a HAR file.

Packager.ExportAsHttpArchive(tempDirectory, "export.har");