question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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

screenshot from 2018-01-27 12-52-53

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. screenshot from 2018-01-27 12-49-49

so I think if we can show this result in HTML preview mode is good 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
stalinginocommented, Jul 27, 2018

Insomnia does not need to know that the content is html. Just a preview as HTML option would be nice

0reactions
Quantiversalcommented, Nov 9, 2018

Agreed with @stalingino. If we know it’s html, would be nice to quickly force a preview for a certain method.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found