Preview View
The Preview view renders the response body based on its content type.
HTML Responses
Section titled “HTML Responses”If the response content type is text/html, the preview view renders the HTML in a sandboxed iframe:
<!-- Response body (HTML) --><html> <body> <h1>Hello from the API</h1> <p>This HTML is rendered in the preview panel.</p> </body></html>Image Responses
Section titled “Image Responses”If the response content type is an image (image/png, image/jpeg, image/gif, image/svg+xml), the preview displays the image inline.
Plain Text
Section titled “Plain Text”For all other content types, the preview falls back to displaying the raw text.
Sandboxing
Section titled “Sandboxing”The HTML preview iframe uses the allow-scripts sandbox attribute, which:
- Blocks pop-ups
- Blocks form submissions
- Blocks same-origin access
- Allows JavaScript execution (any JS in the HTML will run inside the sandbox)