Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.67k stars 1.96k forks source link

[Feature Request] Add one more preview mode through a template file which send by user. #534

Closed Tracyhuahua2020 closed 6 years ago

Tracyhuahua2020 commented 7 years ago

Details

Now, there are three ways to preview json response, visual preview,source code and raw data. I want one more way,which is I sent a html template file to insomnia and show the json in my way through this template file.

gschier commented 7 years ago

That's an interesting idea! Can you ellaborate further on what exactly you'd be using this for so I can better understand the problem?

gschier commented 7 years ago

An example of a template file you might want woud also be useful 😀

Tracyhuahua2020 commented 7 years ago

A template may be in Nunjucks syntax, takes the JSON response as context, and renders into a html page.

image

An extremely simple example:

<html>
    <body>
        <h1>total count: {{ resp.summary.totalCount }}</h1>
    </body>
</html>

What you can do depends on your imagination, e.g. drawing a chart using d3.js in combination with the response data.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

lixaotec commented 9 months ago

So: what happened to this? Wish to have table view