[Feature Request] : add HTML Preview Mode
See original GitHub issue- Insomnia Version: 5.12.4
- Operating System: Ubuntu 17.10
Details
Some time when use Api, send data in json mode and change header to header("Content-Type: application/json"); . when something wrong in php code and show errors in html format without html and body tag like this
my code for show problem :
<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
header("Content-Type: application/json");
echo json_encode($undefined_var);
and error show without any html and body tag (because header set “Content-Type: application/json”)
<br/><b>Notice</b>: Undefinedvariable: undefined_varin<b>/var/www/html/error.php</b>online<b>7</b><br/>null

when errors are big very hard to read , and I my solution for read, create a file a.html with html and body tags and past into it and my result is :
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<br/><b>Notice</b>: Undefinedvariable: undefined_varin<b>/var/www/html/error.php</b>online<b>7</b><br/>null
</body>
</html>
now open a.html in browser and read errors.

so I think if we can show this result in HTML preview mode is good 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
[Feature Request] : add HTML Preview Mode · Issue #729
[Feature Request] : add HTML Preview Mode #729 ... Some time when use Api, send data in json mode and change header to...
Read more >Advanced Features: Preview Mode
First, create a preview API route. It can have any name - e.g. pages/api/preview.js (or .ts if using TypeScript). In this API route,...
Read more >Feature Requests (Embed) - Unlayer
I would like to add a column with e.g. background image and inside this column I would like to add new columns with...
Read more >Preview your ad or HTML page - Google Web Designer Help
To preview your work, use one of the following methods: Click the Preview button in the top right corner of the window. Select...
Read more >Bring back preview links (in addition to live preview)
Many thanks for adding the live preview mode—this is a great addition! ... Bring back preview links (in addition to live preview). Feature...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Insomnia does not need to know that the content is html. Just a preview as HTML option would be nice
Agreed with @stalingino. If we know it’s html, would be nice to quickly force a preview for a certain method.