Insomnia is most commonly used for displaying text content like JSON and XML, and it also has the ability to display rich content in the following formats:
- Audio files
Access the Preview tab dropdown menu to change the Preview Mode. Note that the tab name changes between Preview, Source, and Raw as you select a new option.
Use the Preview dropdown menu to change the Preview Mode.
To execute a plain text search of a response, click inside the response and type CTRL + F (or CMD + F on Mac) to open the search bar. Type your search term and press enter, and the matching keywords will be highlighted.
JSONPath is used to filter JSON responses, while XPath is used to filter XML responses. Click on the
? for examples.
Note: You will only see the
? icon on JSON and XML responses.
On returned JSON and XML, click the question mark icon for examples.
Save to File
If the response is too large, or you want to save or parse the response outside of Insomnia, you can save the raw response directly to a file. To do this, click the Preview dropdown menu then Save Raw Response.
Access Response History
Past responses can be viewed in the dropdown menu of the response window.
Click the response window dropdown menu to see response history.
Activating a past response will show the response in the response window. You can also revert the request to the state it was in when the response was saved.