Skip to content

Read the response ​

After you send a request, the lower half of the window shows what the server answered. This page explains the status bar, each response tab, and how to search, save, copy and keep a response.

A 200 OK response with its status bar, tabs and a JSON body
  1. 1Status — The status code and its reason phrase.
  2. 2Time — From sending the request to receiving the whole response.
  3. 3Size — The size of the body, not counting headers.
  4. 4Find in body — Opens the find bar. Ctrl+F does the same.
  5. 5Save body — Saves the response body to a file.
  6. 6Save as example — Keeps this response with the request.
  7. 7Copy body — Copies the whole body to the clipboard.
  8. 8Response tabs — Different views of the same response.

Before and during a request ​

You seeMeaning
Hit Send to see the response hereNothing has been sent from this tab yet
Sending request…The request is on its way. Select Cancel to stop waiting.
A box with an error messageThe request failed before any status arrived. See When there is no response.

Each request tab keeps its own response until you send again or close the tab.

The status bar ​

Status ​

The coloured badge shows the status code and its reason phrase, for example 200 OK or 404 Not Found. Point at it for a one-line explanation of that code.

RangeMeaning
1xxInformational: the request is still being processed
2xxSuccess: the request worked
3xxRedirect: the resource is somewhere else
4xxClient error: something is wrong with the request
5xxServer error: something went wrong on the server

ApiWorkbench shows 4xx and 5xx answers as normal responses, so you can read the error the server sent. Redirects are followed for you by default, and you see the final response. The Console lists every hop.

More on status codes: HTTP basics.

Protocol ​

A badge such as HTTP/3 appears next to the status when the app knows which HTTP version the server agreed to. Choose your preferred version in Settings.

Time and size ​

  • Time runs from sending the request to receiving the whole response, including connecting to the server. Under one second it shows milliseconds (230 ms), above that seconds (1.25 s).
  • Size is the size of the response body, not counting headers.

Action buttons ​

ButtonWhat it does
MagnifierFind in body
Download arrowSave response body to a file
BookmarkSave as example
DocumentSave request and response as a Markdown doc (secrets masked)
Two sheetsCopy body

On a narrow window, Save as example and Save as Markdown doc move into the More response actions menu (three dots).

With Chaos Mode on, an emoji for the status class appears in front of the status.

Response tabs ​

TabShows
PrettyThe body laid out for reading, with JSON indented and colour-coded
RawThe body exactly as the server sent it, as plain text
PreviewThe body rendered: HTML pages, images, SVG and PDF. Other binary data shows as bytes.
Headers (n)The response headers, with their count
CookiesCookies this response set, and what the cookie jar holds for the address
TestsResults of the request's tests and of pm.test calls in its scripts
VisualizeAppears only when a script called pm.visualizer.set

ApiWorkbench remembers which response tab you had open for each request tab.

Pretty ​

If the body is JSON, Pretty re-indents it and colours keys, strings, numbers and literals. If it is not JSON, Pretty shows the text as it is.

Raw ​

The body with nothing changed. Use it to check exact whitespace, or for HTML, XML and other text. An empty body reads (empty body).

You can select and copy text in both Pretty and Raw.

Preview ​

Preview looks at the Content-Type header, and at the first bytes of the body when the header is missing, and picks a view.

BodyWhat Preview shows
HTML pageThe page, rendered as static content on a white background
PNG, JPEG, GIF, WebP, BMP imageThe picture, with its type, dimensions in pixels and file size
SVG imageThe drawing. Scripts and links to other files inside it are ignored.
PDF documentThe page count when the file states it, the file size, and Open in viewer and Save buttons
JSON or textA note that there is nothing to render, with Open Pretty and Open Raw buttons
Other binary dataA hex view
Empty bodyThe response has no body.

HTML pages

  • Scripts in the page do not run in the preview.
  • Load remote images is off at first. Pictures from other servers are not fetched until you turn it on, because loading them tells that server you opened the page. Images embedded in the page always show.
  • Open in browser saves the page to a temporary file and opens it in your browser, where its scripts do run.
  • Only the first 1 MB of a page is previewed. Open in browser shows all of it.

Images

Pinch or scroll to zoom and drag to move. Reset zoom fits the picture to the pane again.

Headers ​

Every response header, sorted by name. Header values can be selected and copied. To check a header automatically, add a Header contains test.

Cookies ​

Two lists:

  • Set by this response: the Set-Cookie headers of this response, taken apart. A note marks any the cookie jar ignored, and why.
  • Cookies in the jar for this URL: what the jar would send with the next request to the same address.

Manage opens the cookie manager. See Cookies.

Tests ​

The label shows passed out of total, for example Tests (3/4), green when everything passed and red otherwise. Each line shows a tick or a cross, and a failed line says what came back instead. With no tests, the tab reads No tests defined. See Tests and Scripts.

Visualize ​

This tab is there only when the request's post-response script built a view with pm.visualizer.set. Switch between Rendered and HTML. Scripts inside the template are not run. See Script reference.

Find text in the body ​

  1. Press Ctrl + F (Cmd + F on a Mac), or select the magnifier in the status bar.

    The find bar opens over Pretty or Raw. From any other tab, the view switches to Pretty first.

  2. Type the text. Every match is highlighted, and a counter shows where you are, for example 3 of 12.

  3. Press Enter for the next match and Shift + Enter for the previous one. The arrow buttons do the same.

  4. Press Esc to close the bar and clear the highlights.

  • Aa turns on Match case, so id does not find ID.
  • Find searches what the current tab shows: the indented text in Pretty, the original text in Raw.
  • Searching stops after 10,000 matches. The counter then ends in +.
  • No match reads No results.

Large responses ​

To stay fast, Pretty and Raw show the first 64 KB of a body. A larger body gets a note above it:

text
Preview limited to 64.0 KB of 2.31 MB.

Select Show full body to load all of it into Pretty and Raw, for this response only. Back to preview returns to the first 64 KB.

Body sizeWhat happens
Up to 64 KBShown in full
Over 64 KBPreview, with Show full body
Over 5 MBShow full body asks first: showing it all can be slow and use a lot of memory. Select Show anyway to go on.
Over 32 MBOnly the first 32 MB can be shown. Save the response to a file for the rest.

The limit affects only what is drawn. Find works on the full body once you show it. Copy body, Save response body to a file, tests and captures always use the whole body.

Hex view for binary bodies ​

When a body is not text and not a picture the app can draw, Preview shows it as bytes, with the Content-Type and the body size above.

text
offset  00 01 02 03 04 05 06 07  08 09 0a 0b 0c 0d 0e 0f  text
000000  50 4b 03 04 14 00 00 00  08 00 5a 7b 2c 59 a1 b2  PK........Z{,Y..

Each row shows where it starts in the body (the offset, in hex), the bytes in hex, and the same bytes as text. Bytes that are not printable show as a dot.

The hex view shows the first 1 MB. Save the response to a file to see the rest.

Save the body to a file ​

  1. Select the download arrow, Save response body to a file.

  2. Choose where to save. A file name is suggested for you.

  3. Confirm. A message reads Response saved.

The whole body is written, byte for byte, whatever its size. The suggested name comes from, in this order:

  1. the file name in the response's Content-Disposition header
  2. the last part of the URL, when it ends in an extension, such as report.pdf
  3. the request name, with an extension that matches the content type, such as .json or .png

Copy the body ​

Select Copy body. The whole body goes to the clipboard as text, and a message reads Response body copied to clipboard.

To copy part of it, select the text in Pretty or Raw and copy as usual.

Save the request and response as a document ​

The document button saves a Markdown file with the request, the response headers and body, and a cURL command. Auth tokens and secret variable values are masked. See Collection docs.

Saved examples ​

An example is a response kept with its request. It shows what the request returns without sending it, and it appears in generated docs.

Save a response as an example ​

  1. Send the request.

  2. Select the bookmark, Save as example.

  3. Type an Example name. The status, such as 200 OK, is suggested.

  4. For a request that is in a collection, leave Also save the request to … now ticked to store the example straight away. Without it, the example waits until you save the request.

  5. Select Save.

The example keeps the status, the headers, the body and a copy of the request as it was. Binary bodies are not kept: for those, only the status and headers are saved. Very large text bodies are cut at 512 KB.

Open and edit examples ​

In Collections, a request with examples shows their count at the end of its row. Select the number to list the examples under the request, then select one to open it.

In the example editor you can:

  • change the Name, Status and Status text
  • edit the body under Raw, read it under Pretty, and tidy it with Format JSON
  • add, change and remove response headers on the Headers tab
  • see the original request the example was saved from
  • Duplicate it, Delete it, or Open request to go to its request

Select Save to keep your edits. Delete asks you to confirm and cannot be undone.

When there is no response ​

If the request fails before a status arrives, the response area shows a box with a readable reason instead of a status bar: the host name could not be found, the connection was refused, a certificate was rejected, or the request timed out.

Common causes:

  • a typing mistake in the URL, or https:// for a server that only speaks http://
  • the server is not running, or a firewall or VPN blocks it
  • a self-signed certificate on a local server
  • a variable such as {{baseUrl}} that has no value

Troubleshooting has fixes for each.

Next steps ​