Skip to content

POSTING 3 ~/guide/responses/

Responses

Overview

When a response arrives, it's shown in the Response panel. The panel's title shows the status code and reason, coloured green for success, yellow for redirects and red for errors, along with the size of the response and how long it took.

A JSON response, formatted and highlighted.

While a request is in flight, the URL bar shows its progress through each stage of the exchange, and you can press Esc to cancel it. If a request fails, for example because the host can't be found or the connection times out, the Response panel explains what went wrong.

The response has four tabs. Jump to them with Ctrl+O followed by A S D F. A gRPC response has a Trailers tab in place of Cookies. See gRPC responses.

Body

The response body, syntax highlighted based on its Content-Type. JSON, HTML, XML, CSS, JavaScript and YAML are highlighted. JSON is also indented to make it easier to read; to see JSON exactly as the server sent it, set response.prettify_json: false in your configuration.

Move into the body with Down (or jump to it with Ctrl+O then A, then Down) to move through it and select text. The body is read-only, and supports the same Vim-style keys as Posting 2. Below the body, Posting shows its content type, number of lines and, while the body has focus, the cursor's line and column.

Key Action
Up Down Left Right / K J H L Move the cursor
W / B, Ctrl+Right / Ctrl+Left Next / previous word
0 ^ Home Ctrl+A / $ End Ctrl+E Start / end of the line
G / Shift+G Top / bottom of the body
% The bracket matching the one under the cursor
Page Up / Page Down Up / down a page
Shift + movement, or Shift+K Shift+J Shift+H Shift+L Shift+W Shift+B Select while moving
V Visual mode: moving the cursor selects, as if you were holding Shift. Esc leaves it
Shift+V / F6 Select the line
F7 Select the whole body
Y / C Copy the selection, or the whole body if nothing is selected
Ctrl+F / / Find text in the body
N / Shift+N Next / previous match while search is open
F3 Open the body in your pager
F4 Open the body in your editor

You can also click and drag to select, double-click to select a word, and triple-click to select a line. In visual mode, the character under the cursor is part of the selection, as it is in Vim.

Click copy or wrap on/wrap off below the body to copy it or turn line wrapping on or off, or choose Copy response body or Toggle response wrap in the command palette.

Searching a response

With the body focused, press Ctrl+F or / to open Find. Matches highlight as you type, and the search bar shows the current match and total, or No matches. Search is literal (not a regular expression) and ignores case.

Press Enter for the next match or Shift+Enter for the previous one; both wrap around at the ends of the body. Press Up to return to the body while keeping search open, then use N and Shift+N to navigate matches, or Y to copy the selected match.

Esc closes search and clears its highlights, leaving the result selected for copying. Reopening Find selects the previous query so you can replace it. Each request tab keeps its own search.

Unlike Posting 2, Ctrl+F opens Find rather than paging down. Use Page Down for a full page or Ctrl+D for half a page (Ctrl+U moves up half a page).

Headers

The response headers, one per row.

Cookies

The cookies the response set, with each cookie's name, value, path, and whether it's HttpOnly or Secure.

Cookies from responses are remembered until you quit Posting, and sent with later requests to the same site, unless you turn off Attach cookies in the request's Options.

Trace

A timeline showing how long each stage of the exchange took:

Stage
connect Opening a connection to the server
tls handshake Setting up an encrypted connection (skipped for http:// URLs)
send headers Sending the request line and headers
send body Sending the request body
receive headers Waiting for the server, until the response headers arrive
receive body Reading the response body
response closed Finishing the exchange

The trace is a quick way to see whether a slow request is slow to connect, slow on the server, or slow to download. The same stages are shown as small squares in the URL bar while the request is in flight.

Traces are kept in history, so you can look back at the timing of earlier responses too.

Making room

Press Alt+Z in the Response panel to expand it to fill the screen, and again to restore it. Layout: side by side in the command palette puts the response beside the request, which suits wide terminals.

Responses in other tabs

Each request tab keeps its own response. If a response arrives for a tab you're not looking at, it waits in that tab until you go back to it, and every response is added to history.