# Inspector

> Read any captured request and response in the Cloak Proxy inspector. Covers the layout, summary bar, code view and every request and response tab.

Source: https://docs.subcloak.com/cloak-proxy/inspect/inspector/

The inspector shows the request you select in the [traffic list](https://docs.subcloak.com/cloak-proxy/inspect/traffic-list/): a summary bar, then the request and the response, each split into tabs for headers, body, cookies and more. It sits below the list, or to its right if you prefer. Tabs that don't apply to a request, such as **GraphQL** or **Auth**, only appear when they're relevant.

*[Screenshot: The inspector below the traffic list: a summary bar with a GET pill, a 200 OK pill, the URL https://api.example.com/v1/users with the host in blue, 360 ms, 429 bytes and Safari, then the Request pane on the Header tab and the Response pane on the Body tab showing a JSON tree. The inspector: a summary bar, then the request and response side by side.]*

## Layout

- **Below or to the right.** (added in Cloak Proxy 0.2.2) Click **Layout** in the toolbar to move the inspector to the right of the traffic list, and again to put it back below. Below the list, the request is on the left and the response on the right. To the right of the list, the request is above the response. Cloak Proxy remembers your choice.
- **Inspector size.** Drag the line between the traffic list and the inspector to give either more room. Cloak Proxy remembers the position for each layout. Double-click the line to put it back to the default.
- **Request and response.** Drag the divider between the request and response panes to resize them.
- **Which request.** The inspector shows the selected request. When several are selected, it shows the newest one (the highest **#**).
- **Nothing selected.** The inspector says **Select a request to inspect it** and reminds you that <kbd>↑</kbd> <kbd>↓</kbd> move between requests and <kbd>⌘</kbd> <kbd>F</kbd> filters.
- **Tunnels.** For an HTTPS connection that wasn't decrypted, the inspector shows an explanation and buttons to turn on decryption instead of tabs. See [Failed requests and tunnels](https://docs.subcloak.com/cloak-proxy/inspect/failed-requests-and-tunnels/).

## The summary bar

The bar across the top of the inspector summarizes the request.

| Item | Shows |
|---|---|
| Method pill | The HTTP method, colored like the traffic list |
| Status pill | The status code and reason, for example **200 OK**, colored by class. **Active** in orange while waiting (with a spinner), **Failed** in red when there's no response. |
| URL | The full URL in a monospaced font, with the host in your accent color and the query dimmed. It's selectable, and long URLs are shortened in the middle (hover for all of it). Right-click it for **Copy URL**. |
| Duration | How long the exchange took, orange over 1 second and red over 3 |
| Size | The response body size |
| App | The app's icon and name. Hover to see its process number. |
| Copy menu (•••) | **Copy URL**, **Copy as cURL**, **Copy Request** and **Copy Response** |

**Copy Request** and **Copy Response** copy the whole message as text: the start line, every header, a blank line and the decompressed body. When a request failed, the error appears on a second line under the bar in orange.

## Tabs

The tabs are compact text labels after **Request** and **Response**; the selected one is in your accent color. Each tab with a count shows it next to its name, such as **Header 4** or **Cookies 2**. Cloak Proxy remembers the last tab you chose in each pane and opens it for the next request. If that tab doesn't exist for the next request (say, **Auth** on a request without an `Authorization` header), the request pane falls back to **Header** and the response pane to **Body**.

### Request tabs

| Tab | Appears | Shows |
|---|---|---|
| **Header** | Always | Every request header |
| **Query** | Always | The URL's query parameters, decoded |
| **Body** | Always | The request body in the [body viewer](https://docs.subcloak.com/cloak-proxy/inspect/body-viewers/) |
| **Form** | Form posts (`application/x-www-form-urlencoded` or `multipart/form-data`) | Each form field as a name and value |
| **GraphQL** | GraphQL requests | The formatted query and its variables. See [WebSocket and GraphQL](https://docs.subcloak.com/cloak-proxy/inspect/websocket-and-graphql/). |
| **Cookies** | Always | Cookies sent in the `Cookie` header |
| **Auth** | Requests with an `Authorization` header | The decoded token or credentials |
| **Raw** | Always | The request as text |
| **Code** | Always | The request as code in 24 formats |
| **Summary** | Always | Timing, sizes, protocol, TLS and the client |
| **Contract** (added in Cloak Proxy 0.4.0) | Requests checked by [API Contracts](https://docs.subcloak.com/cloak-proxy/testing/contract-checking/) | The operation the request matched and each place it breaks the spec, with the JSON path, expected and actual values, the schema location and the body around it. A red or orange count in the summary bar opens it. |
| **Trace** (added in Cloak Proxy 0.4.0) | Requests or responses with trace headers, or `Server-Timing` | The trace and span IDs, whether propagation held, **Open in …** your tracing backend, the other requests in the trace and the server's timings. See [Distributed tracing](https://docs.subcloak.com/cloak-proxy/inspect/distributed-tracing/). |

### Response tabs

| Tab | Appears | Shows |
|---|---|---|
| **Messages** | WebSocket connections | Every frame sent and received. Replaces **Body**. |
| **Messages** (added in Cloak Proxy 0.4.0) | Streamed responses (SSE, JSON lines, multipart) | Each event, live, with its arrival time, next to **Body**. See [Streaming responses](https://docs.subcloak.com/cloak-proxy/inspect/streams/). |
| **GraphQL** (added in Cloak Proxy 0.4.0) | GraphQL subscriptions over a WebSocket or SSE, and `@defer`/`@stream` responses | Each operation with its status and results. See [Streaming responses](https://docs.subcloak.com/cloak-proxy/inspect/streams/#graphql-subscriptions). |
| **AI** (added in Cloak Proxy 0.4.0) | Model calls (OpenAI, Anthropic, Gemini, Ollama and compatible APIs) | Tokens, cost, time to first token, context window, tool calls and the reply. Model calls open on this tab. See [LLM Inspector](https://docs.subcloak.com/cloak-proxy/inspect/llm-inspector/). |
| **Header** | Always | Every response header |
| **Trailers** (added in Cloak Proxy 0.5.1) | Responses with trailing headers (native gRPC) | The headers the server sent after the body, such as `grpc-status` and `grpc-message`. See [Native gRPC through Cloak Proxy](https://docs.subcloak.com/cloak-proxy/inspect/protobuf-and-grpc/#native-grpc-through-cloak-proxy). |
| **Body** | Everything except WebSockets | The response body in the [body viewer](https://docs.subcloak.com/cloak-proxy/inspect/body-viewers/) |
| **Set-Cookie** | Responses with `Set-Cookie` headers | Each cookie the server set, with its attributes |
| **Raw** | Always | The response as text |

Until a response arrives, the response pane shows **Waiting for the response…**. If the request failed, it shows **No response** and the error.

## Header

The **Header** tab lists headers in the order they were sent, with repeated headers (such as two `Set-Cookie` lines) kept separate.

*[Screenshot: The request Header tab listing Host, Authorization with a bearer token, Accept and Cookie headers, names in gray and values in black, with a show-as-text button and a copy button at the right of the tab bar. Request headers as a table. The button at the right shows them as plain text.]*

- The table shows each header's name in gray and its value next to it, both in a monospaced font. Long values wrap to up to eight lines.
- The text button at the right of the tab bar shows the headers as `Name: Value` lines in the [code view](#raw), where you can select them, search with <kbd>⌘</kbd> <kbd>F</kbd>, and decode with [Quick Preview](https://docs.subcloak.com/cloak-proxy/inspect/quick-preview/). Click it again for the table.
- The copy button copies every header as `Name: Value` lines.

Your choice of table or text applies to both panes and is remembered.

## Copy from a table

The **Header**, **Query**, **Form**, **Cookies** and **Set-Cookie** tabs are name and value tables. Right-click a row:

| Item | Copies or does |
|---|---|
| **Copy Value** | The row's value |
| **Copy Name** | The row's name |
| **Copy “Name: Value”** | Both, as a `Name: Value` line |
| **Copy All** (added in Cloak Proxy 0.2.2) | Every row in the table, as `Name: Value` lines |
| **Trace Value** (added in Cloak Proxy 0.2.1) | Opens [Trace Value](https://docs.subcloak.com/cloak-proxy/inspect/trace-value/) for the row's value. Only when the value is at least 3 characters. |
| **Show as Column** / **Remove Column** (added in Cloak Proxy 0.2.2) | On the **Header** tabs: adds this header as a column in the traffic list, or removes it. See [Add a header column](https://docs.subcloak.com/cloak-proxy/inspect/traffic-list/#add-a-header-column). |

You can also select text in any cell and copy it with <kbd>⌘</kbd> <kbd>C</kbd>.

## Query

The **Query** tab lists the URL's query parameters with their values decoded. The count in the tab shows how many there are. Parameters that repeat appear once per occurrence. When there are none, it says **No query parameters**.

*[Screenshot: The Query tab listing page 1, limit 2 and sort name. Query parameters from https://api.example.com/v1/users?page=1&limit=2&sort=name.]*

## Body

The **Body** tab shows the request body in the same viewer as response bodies: a JSON tree, pretty and raw text, hex, form tables and more. It decompresses gzip, deflate and Brotli first. Requests without a body, like most `GET` requests, show **No body**. Everything about the viewer is on [Body viewers](https://docs.subcloak.com/cloak-proxy/inspect/body-viewers/).

## Form

The **Form** tab appears for form posts. It shows each field as a name and a decoded value.

*[Screenshot: The Form tab listing email ada@example.com, plan pro and coupon SAVE20. A URL-encoded form post, decoded into fields.]*

For `multipart/form-data` uploads, text fields show their value and file fields show the file name and size instead of the file's bytes. See [Form and multipart bodies](https://docs.subcloak.com/cloak-proxy/inspect/body-viewers/#form-and-multipart-bodies).

## Cookies

The request **Cookies** tab splits the `Cookie` header into one row per cookie, so `session=abc123; theme=dark` becomes `session` and `theme`. When the request sends none, it says **No cookies**.

*[Screenshot: The request Cookies tab listing session abc123 and theme dark. Cookies the request sent.]*

## Set-Cookie

The response **Set-Cookie** tab lists each cookie the server set. The value comes first, followed by the cookie's attributes in parentheses, such as `Path`, `HttpOnly`, `Secure`, `SameSite` and `Max-Age`.

*[Screenshot: The Set-Cookie tab listing session abc123 with Path, HttpOnly, Secure and SameSite=Lax attributes, and theme dark with Path and Max-Age=3600. Each cookie with its attributes.]*

To check cookie flags across a whole session, use the [Security](https://docs.subcloak.com/cloak-proxy/insights/security/) page in Insights.

## Auth

The **Auth** tab appears when the request has an `Authorization` header. It decodes what it can:

| Header | Shows |
|---|---|
| A JSON Web Token, such as `Bearer eyJ…` | The token's header and payload as formatted JSON, then when it was issued, when it becomes valid and when it expires, marked **(expired)** or **(valid)** |
| `Basic` credentials | **Basic authentication** and the decoded `user:password` |
| Anything else | The header as it was sent |

*[Screenshot: The Auth tab decoding a JSON Web Token: header with alg HS256 and typ JWT, payload with sub, name, iat and exp, issued and expiry dates marked valid, and the note Signature is not verified. A bearer token decoded. The signature isn't checked.]*

(added in Cloak Proxy 0.5.1) A JWT gets a bar above it with the time left (live), the algorithm and quick warnings (unsigned, a key in the header, a long lifetime), and **Tokens and Sign-in…**, which opens [Tokens and sign-in](https://docs.subcloak.com/cloak-proxy/security/tokens-and-sign-in/) on that token.

> **Caution:**
> The Auth tab shows credentials in plain text, including decoded Basic passwords. Take care when sharing your screen or screenshots. Cloak Proxy doesn't verify JWT signatures, so **(valid)** only means the expiry date hasn't passed.

## Raw

The **Raw** tabs show the message as text: the start line (for example `GET /v1/users?page=1 HTTP/2.0` or `HTTP/2.0 200 OK`), every header, a blank line and the decompressed body. Binary bodies are replaced by a note pointing you to the **Hex** view. Bodies over 5 MB show their first 5 MB.

*[Screenshot: The request Raw tab: line-numbered text starting GET /v1/users?page=1&limit=2&sort=name HTTP/2.0 followed by the Host, Authorization, Accept and Cookie headers, with header names colored. The request as text.]*

*[Screenshot: The response Raw tab: line numbers, HTTP/2.0 200 OK, Content-Type, Content-Length and two Set-Cookie headers, then the JSON body with syntax colors. The response as text, body included.]*

### The code view

(added in Cloak Proxy 0.2.2)

**Raw**, headers shown as text, the **Pretty** and **Raw** body views, the **Code** tab and the GraphQL query all use the same read-only code view:

| Feature | What it does |
|---|---|
| Line numbers | Down the left edge. The line with the cursor is highlighted. |
| Syntax colors | For HTTP messages, JSON, XML and HTML, JavaScript, CSS, GraphQL and hex dumps. Texts over about 6 million characters stay plain. |
| Folding | A chevron next to the line number folds the object or array that starts on that line into `…`. Click the chevron or the `…` to open it again. Works for JSON, JavaScript, CSS and GraphQL, and for the body of an HTTP message. |
| Find | Click in the text and press <kbd>⌘</kbd> <kbd>F</kbd> to open a find bar for this text only. Outside a code view, <kbd>⌘</kbd> <kbd>F</kbd> goes to the quick filter. |
| Copy | Select text and press <kbd>⌘</kbd> <kbd>C</kbd>. Folded parts are copied in full. |

Right-click the text for **Find…**, **Fold All** and **Unfold All**, and, with text selected, **Decode as** items from [Quick Preview](https://docs.subcloak.com/cloak-proxy/inspect/quick-preview/) such as **Decode as Base64**.

## Code

The **Code** tab turns the request into code you can run. Choose a format from the menu (it starts at **cURL**) and click the copy button at the right. Cloak Proxy remembers the format you picked.

*[Screenshot: The Code tab with cURL chosen: a line-numbered curl command with the URL and Authorization, Accept and Cookie headers, and a copy button. The request as a curl command.]*

The formats, and what each one leaves out, are on [Copy as code](https://docs.subcloak.com/cloak-proxy/inspect/copy-as-code/).

## Summary

The **Summary** tab collects the facts about the exchange in one place.

*[Screenshot: The Summary tab: URL, Method GET, Status 200 OK, Protocol HTTP/2.0 to HTTP/2.0, TLS Decrypted by Cloak Proxy, Client Safari (process 501), Client address 127.0.0.1, Remote api.example.com:443, Started, Duration 360 ms, then Request 4 ms, DNS 12 ms, Waiting 274 ms and Download 70 ms, Request size 0 bytes, Response size 429 bytes, Content type application/json. Who sent the request, how, and how big it was.]*

| Row | Shows |
|---|---|
| **URL** | The full URL |
| **Method** | The HTTP method |
| **Status** | The status code and reason, or **Waiting**, **Tunneled**, **Completed** or **Failed:** and the error |
| **Protocol** | The request's HTTP version, then the response's, for example `HTTP/2.0 → HTTP/2.0` |
| **TLS** | **Decrypted by Cloak Proxy**, **Passed through encrypted**, or **None (plain HTTP)** |
| **Client** | The app's name and process number |
| **Executable** | The path to the program that sent the request, when known. For an app, this can be a helper inside its bundle. |
| **Client address** | Where the connection came from: `127.0.0.1` for this Mac, or a device's IP address |
| **Remote** | The server's host and port |
| **Started** | Date and time the request started |
| **Duration** | Total time |
| **Request**, **DNS**, **Waiting**, **Download** (added in Cloak Proxy 0.5.1) | How the time went, for requests Cloak Proxy sent on (see below) |
| **Scope** (added in Cloak Proxy 0.5.1) | With a [scope](https://docs.subcloak.com/cloak-proxy/security/scope/) active: whether the request is in it, and which rule decided |
| **Request size** | Request body size, marked **(truncated)** if it was over the capture limit |
| **Response size** | Response body size, marked **(truncated)** if it was over the capture limit |
| **Content type** | The response's `Content-Type` |

Under **Duration**, requests Cloak Proxy sent on show how the time went (added in Cloak Proxy 0.5.1): **Request** (until it went to the server: reading it from the app, rules and breakpoints), **DNS** (the lookup, when there was one), **Waiting** (until the response headers arrived) and **Download** (the body). Apps using [CloakProxyKit](https://docs.subcloak.com/cloak-proxy/devices/in-app-sdk/) show their own phases instead (**DNS**, **Connect**, **TLS**, **Request**, **Waiting**, **Download**). The same rows are in the web UI on Linux.

### Connection

(added in Cloak Proxy 0.3.0)

The **Connection** section at the end of the Summary tab shows how the request's connection went. The panel for an encrypted tunnel shows it too. It comes from the [Doctor](https://docs.subcloak.com/cloak-proxy/capture/doctor/)'s connection log, so it appears for requests captured in this run while their connection is among the newest 4,000, and not for imported sessions.

| Row | Shows |
|---|---|
| **Kind** | **HTTP**, **Tunnel**, **Decrypted**, **SOCKS**, **Captured** or **Reverse proxy**, and the connection's number |
| **Connect** | For tunnels Cloak Proxy relays: the time to connect to the server, DNS included |
| **TLS with the app** | For decrypted connections: the handshake time, TLS version and the ALPN protocol (`h2` or `http/1.1`) |
| **TLS alert** | The alert the app sent when it refused Cloak Proxy's certificate, such as "bad certificate" |
| **Requests on it** | Requests on the same connection, and how many weren't recorded and why (paused, muted, Allow List) |
| **Failure** | How the connection failed, for example **Connection refused** or **Closed after handshake** |
| **DNS** | The DNS lookup before the request was sent on (`<1 ms` when cached) |
| **Server** | Time from sending the request on to the response, or **Server failure** and why |
| **HTTP/3** | The server offered HTTP/3 in an `Alt-Svc` header |

A failed request shows **Why did this fail?** there, and **Why?** next to its error under the URL. Both open the Doctor for the app that sent it.

> **Note:**
> Bodies larger than the **Max captured body size** in **Settings › General** (32 MB by default; see [Network settings](https://docs.subcloak.com/cloak-proxy/capture/network-settings/)) are still forwarded in full. Only the first part is kept for the inspector, and the body viewer shows a **Truncated** label.

## Related

  - [Body viewers](https://docs.subcloak.com/cloak-proxy/inspect/body-viewers/): JSON tree, JSONPath, jq, hex, previews and decoders.
  - [WebSocket and GraphQL](https://docs.subcloak.com/cloak-proxy/inspect/websocket-and-graphql/): The Messages and GraphQL tabs.
  - [Streaming responses](https://docs.subcloak.com/cloak-proxy/inspect/streams/): SSE, JSON lines and GraphQL subscriptions, event by event.
  - [LLM Inspector](https://docs.subcloak.com/cloak-proxy/inspect/llm-inspector/): Tokens, cost and prompt caching for every model call.
  - [Quick Preview](https://docs.subcloak.com/cloak-proxy/inspect/quick-preview/): Decode Base64, JWTs, URL encoding and timestamps from any text.
  - [Copy as code](https://docs.subcloak.com/cloak-proxy/inspect/copy-as-code/): cURL and 19 other formats.
