Discover how a simple view change can save you hours of frustration reading API responses!
Why Pretty, raw, and preview views in Postman? - Purpose & Use Cases
Imagine you send an API request and get a long, messy response full of code and symbols. You try to read it as plain text, but it's confusing and hard to understand what the data really says.
Reading raw API responses manually is slow and tiring. You might miss important details or misunderstand the data because it's not organized. Copying and formatting the response yourself wastes time and causes errors.
Pretty, raw, and preview views in Postman let you switch how you see the response instantly. Pretty view formats the data neatly, raw shows the exact response text, and preview renders HTML or images. This helps you understand and check responses quickly and clearly.
response = send_request() print(response.text) # messy, hard to read
response = send_request() print(response.text) # formatted and easy to read
It lets you quickly spot errors, understand data structure, and verify API responses without extra work or confusion.
A tester checks a JSON response from a weather API. Using pretty view, they easily see temperature and conditions clearly instead of scrolling through raw text full of brackets and commas.
Manual reading of raw responses is confusing and slow.
Pretty, raw, and preview views organize and display data clearly.
These views speed up testing and reduce mistakes.
Practice
Solution
Step 1: Understand the purpose of Pretty view
The Pretty view formats JSON, XML, or HTML responses with colors and indentation to make them easier to read.Step 2: Compare with other views
Raw view shows the exact text without formatting, and Preview renders HTML content visually. Headers view shows response headers, not body.Final Answer:
Pretty view -> Option BQuick Check:
Formatted response = Pretty view [OK]
- Confusing Raw view with Pretty view
- Thinking Preview shows formatted text instead of rendered content
- Mixing Headers view with body views
Solution
Step 1: Locate the response view tabs
In Postman, response views like Pretty, Raw, and Preview appear as tabs above the response body.Step 2: Identify how to switch views
Clicking the 'Raw' tab directly switches the view to show the exact response text without formatting.Final Answer:
Click the 'Raw' tab next to 'Pretty' in the response section -> Option CQuick Check:
Switch views by clicking tabs = Click the 'Raw' tab next to 'Pretty' in the response section [OK]
- Trying to right-click for Raw view (no such option)
- Looking in Settings instead of response tabs
- Double-clicking does not change views
Solution
Step 1: Understand Preview view purpose
The Preview view renders HTML content visually, like a browser would, showing the page layout and images.Step 2: Consider JSON response in Preview
If the response is JSON, Preview does not format or show it as text; it tries to render it, which usually results in a blank or raw display.Final Answer:
A rendered HTML page if the response contains HTML -> Option AQuick Check:
Preview = rendered HTML content [OK]
- Thinking Preview formats JSON like Pretty view
- Confusing Raw view with Preview
- Expecting headers in Preview
Solution
Step 1: Identify response content type
Preview view renders HTML visually. If the response is JSON or plain text, Preview cannot render it as a page.Step 2: Understand why blank appears
Since JSON is not HTML, Preview shows blank or raw text, not a formatted page.Final Answer:
The response is JSON, not HTML, so Preview cannot render it -> Option AQuick Check:
Preview blank = non-HTML response [OK]
- Thinking Pretty tab must be clicked first
- Believing Postman lacks Preview support
- Assuming Raw view settings affect Preview
Solution
Step 1: Understand the content type and views
HTML with JavaScript and CSS needs to be rendered to see the actual page as a user would.Step 2: Identify the view that renders content
Preview view renders HTML, applies CSS styles, showing the page visually.Step 3: Compare with other views
Pretty view only formats the source code text, Raw shows unformatted source, Headers show metadata only.Final Answer:
Preview view, because it renders HTML and CSS like a browser -> Option DQuick Check:
Visual page check = Preview view [OK]
- Choosing Pretty view expecting visual rendering
- Confusing Raw view with rendered output
- Expecting source code views to show visual layout
Ready to prove it?
Pass the test and this pattern moves unknown
