Format a request / response from within Insomnia REST Client! The result is copied to the clipboard. Currently, a request / reponse is formatted as HTML and plain text.
This plugin requires Insomnia, the Open Source API client.
-
Start Insomnia,
-
Click "Application" -> "Preferences" and choose the "Plugins" tab,
-
Enter
insomnia-plugin-prettyprint-request-response
and click "Install Plugin", -
Close the dialog.
-
Go to a request in any collection,
-
Click on the request drop down menu and select
Copy last response as HTML
. The request and last response are copied to the clipboard: -
Switch to any application capable of accepting HTML from the clipboard and paste. Requests are formatted based on the response code. The following examples show a request / response rendered in a new Microsoft Word document:
This plugin works by exporting the request as HAR and formatting the result. There are currently a few known limitations or known issues which can cause the plugin to fail. These are due to Insomnia Plugin APIs limitations or bugs. This list will be updated as issues are addressed or new APIs become available:
- Only the last response can currently be exported. Insomnia plugin APIs do not allow acessing the currently selected response in the response drop down,
- Formatting the request may fail if any request in any Insomnia collection fails to export. Insomnia plugin APIs do not currently allow to export one request / response from a request action plugin.
Enhancements include:
- Various formatting themes,
- Format HTTP client errors differently then HTTP server errors,
- Allow request / response body trimming,
- Obfuscate / hide headers related to Personally Identifiable Information or secrets (
Authorization
, ...).