> For the complete documentation index, see [llms.txt](https://docs.hypersolutions.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hypersolutions.co/request-based-basics/recording-har-files-for-harvey.md).

# Recording HAR files

This page explains how to record HAR files from your code and your browser for debugging and support. Always record with powhttp, which captures the requests exactly as they went out on the wire.

{% hint style="info" %}
Our [Claude Code plugin](https://docs.hypersolutions.co/ai-plugins/claude-code-plugin.md) and [Codex plugin](https://docs.hypersolutions.co/ai-plugins/codex-plugin.md) analyze HAR files directly in your editor, capture live traffic via powhttp, and can fix your code for you. The plugins and our support team both work from HAR files recorded as described below.
{% endhint %}

### Why powhttp

Anti-bots read three things a normal network inspector hides: your TLS fingerprint, your header order, and the exact case of each header. powhttp records the real wire, so its HAR files keep the header order and case your client sent, including HTTP/2 pseudo-headers.

{% hint style="warning" %}
Do not record HAR files with browser DevTools or Charles. A DevTools export re-sorts headers and normalizes their case. Charles normalizes header order, often drops HTTP/2 pseudo-headers, and replaces your client's TLS handshake with its own. A HAR from either tool hides exactly the problems you are trying to find. The [powhttp guide](https://hypersolutions.co/blog/how-to-use-powhttp-web-scraping#the-three-signals-devtools-cant-show-you) explains this in detail.
{% endhint %}

### Prerequisites

Before continuing, make sure you have [installed powhttp](https://docs.hypersolutions.co/request-based-basics/installing-powhttp.md).

### Routing your script traffic

To record a HAR file, route your script's HTTP traffic through powhttp by setting the proxy address in your code to `http://127.0.0.1:8080` (the default port; check your powhttp settings).

Point your client at the port directly rather than using powhttp's system-proxy (SYS) button. The system proxy captures traffic from every app on your machine and buries your requests in noise.

{% hint style="info" %}
Make sure powhttp is running **before** you start your script, otherwise the requests will fail or bypass the proxy entirely.
{% endhint %}

### Routing your browser traffic

For debugging you usually want two recordings: one of your script and one of a real browser doing the same steps. Route only the browser through powhttp, for example with a per-browser proxy extension, and reproduce the steps. If DevTools is open, turn off "Disable cache": it adds `Cache-Control` and `Pragma` headers a real navigation does not send.

### Recording with powhttp

1. Run your script, or reproduce the steps in your browser, while powhttp is open. You should see the requests appear in the session list.
2. Click the **Download** button (⬇) in the toolbar.

<figure><img src="https://2471110273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIMPIbZNfwQBFmM4pipPj%2Fuploads%2Fgit-blob-919679fe87f9e7803bf0ab39951543f3b5100ec0%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Select **HAR 1.3 (recommended)** from the format options.
4. Choose a location and save the file.

{% hint style="info" %}
For more on getting the most out of powhttp, such as searching a capture, diffing requests, replay, and external proxies, see the [powhttp guide](https://hypersolutions.co/blog/how-to-use-powhttp-web-scraping).
{% endhint %}

### Submitting your HAR file

Once you have your `.har` file saved, you can attach it to your support ticket or send it to us via Discord. The HAR file contains all the request and response data we need to diagnose your issue.

{% hint style="warning" %}
HAR files may contain sensitive information such as cookies, tokens, and authorization headers. If you are concerned about sharing this data, let us know and we can guide you on how to sanitize the file before sending it.
{% endhint %}
