API client
Save captured requests
Turn requests captured by Cloak Proxy into saved API client requests with Save to API Client, keeping headers, body and the response as an example.
Any request the proxy captured can become a saved request in the API client. The client copies its method, URL, headers and body, and keeps the response as an example. Use it to reproduce what an app sent, tweak it and send it again, add tests to it, or start a collection for an API you’re learning from real traffic.
Save a request from the traffic list
Section titled “Save a request from the traffic list”A captured request carries real credentials. They come along when you save it.
- Right-click a request, or several selected requests
- The selected request
- Its Authorization header is copied as is
- So is its Cookie header
- In the main window’s traffic list, select the request. Select several to save them together.
- Right-click and choose Save to API Client. With several selected, it reads Save N Requests to API Client.
- The API client opens with the last saved request in a tab, inside a collection called Captured Requests.
The Captured Requests collection is created the first time and reused after that. Each request is added at its top level. Move them into other collections or folders by dragging them in the sidebar; see Collections and requests.
Save to API Client isn’t available for CONNECT tunnels the proxy didn’t decrypt, since there’s no request inside to copy. Turn on SSL Proxying for the host and capture it again.
You can also save the selected request from global search (⇧ ⌘ A): search for Save Selected Request to API Client.
What gets copied
Section titled “What gets copied”| Part | In the saved request |
|---|---|
| Name | The method and path, such as GET /v1/users. |
| Method and URL | As captured, including the query string. |
| Query parameters | Listed on the Params tab. |
| Headers | Every request header except Host, Content-Length, Connection, Proxy-Connection and Accept-Encoding, which the client sets itself. |
Form body (application/x-www-form-urlencoded) |
An x-www-form-urlencoded body with one row per field. The captured Content-Type header is dropped, since the body type sets it. |
| Other text bodies | A Raw body. JSON is pretty-printed. The language is JSON or XML from the Content-Type, otherwise TEXT. Compressed bodies are decoded first. |
| Response | Saved as an example named after the status, such as “200 OK”, with its headers (minus Content-Length, Content-Encoding, Transfer-Encoding, Connection and Date) and decoded body. |
Binary request bodies, such as images or Protobuf, aren’t copied. Auth isn’t detected: an Authorization header stays a header, and the request’s Authorization tab is set to Inherit auth from parent.
The saved request has its examples ready for a mock server and exported docs.
Clean it up
Section titled “Clean it up”A captured request is a snapshot of one call. Before you reuse or share it:
- Replace the host with a variable. Change
https://api.example.com/v1/usersto{{baseUrl}}/v1/usersand setbaseUrlin an environment. - Move credentials out of headers. Delete the captured
Authorizationheader and set up auth on the Authorization tab, or on the collection, with a value from a secret variable or{{vault:name}}. - Delete the
Cookieheader unless the API needs it. The client keeps its own cookie jar from the responses it gets. - Remove headers that only made sense for the original app, such as tracing IDs.
- Rename the request to say what it does.
Other ways to bring traffic in
Section titled “Other ways to bring traffic in”| Method | Result |
|---|---|
| Export a session as HAR, then import it into the client | A collection named after the file, with one folder per host. Responses become examples. |
| Copy as cURL on a captured request (right-click it in the traffic list), then paste into a request’s URL field in the client (⌘ T opens a new one) | The method, URL, headers and body fill in that request. See Copy as code. |
The MCP tool save_captured_request |
An AI assistant saves a captured request into a collection (default Captured Requests). See MCP tools reference. |
To change a captured request and send it again without saving it in the client, use Edit and Repeat… in the proxy. See Repeat and compose.