Recently I introduced the Insomnia REST client in another blogpost (Sorry, this has been german only!). As mentioned there, this client is constantly being improved and extended to allow for a better and more effective work with REST APIs.
Within the same I also said that you can add missing or useful features to Insomnia through plugins. But until now you had to do your own research to find the plugin you were looking for via boards, search engines or other platforms. This problem has now been solved!
Recently the official Insomnia Plugin Hub version 1.0 was introduced. Plugins can now be obtained centrally from this repository. This makes it easier to search for extensions and allows developers to make their plugins visible to other Insomnia users.
The Insomnia Plugin Hub
The website is minimalistic and functional. You can either scroll through a list of all existing plugins or search for specific keywords using a search box. After a click on the respective plugin you will get further information about it on a subpage.
Installing a plugin
There are two ways to install a plugin in Insomnia. Either you install the plugin by clicking on a button on the website or you install it directly in Insomnia using the name of the NPM package.
Plugins
Currently, there is already a very wide range of plugins available, so it is difficult to list them all in the course of this article. Nevertheless, I would like to introduce two plugins which I found while browsing and which I already use myself.
Faker
It is not uncommon for me to have to enrich requests with dummy data. Unfortunately, I am often not creative and usually create first names like “Testy”. But if I want to create more beautiful input data, because they are validated, transferred to third parties or written into a database for testing purposes, it would be nice if I didn’t have to take care of these values myself. At this point Faker comes into play. Faker allows you to create random data using different predefined categories. This way you can have financial data like BIC/IBAN, names, locations and even file paths generated automatically.
The dummy tags are simply added to the place of the respective value, e.g. in JSON.
With each transmission you now generate JSON with random values.
{ "firstname": "Ivonne", "lastname": "Lesch", "city": "Coraburg", "Department": "Jewelery" }
{
"firstname": "Malte",
"lastname": "Schnürer",
"city": "Ost Svenscheid",
"Department": "Shoes"
}
Insomnia Default Headers
The header information I need for my requests is mostly identical or at least has parts that always remain identical. If you need the same parameters for several different requests, you have to add them manually to each new request. With the Insomnia Default Headers plugin you can create this information centrally as an environment variable. This header information is then added automatically to all new and existing requests. If you need additional, individual parameters, you can add them to the respective request as usual.
{ "DEFAULT_HEADERS": { "Content-Type": "application/json" } }
Conclusion
The Insomnia Plugin Hub is a useful extension and makes the search for plugins much easier. Since it is still quite new, it may happen that the desired plugin is not yet available. But if in doubt, everyone can find a remedy and develop his own plugin ! 🙂
Of course, there is still potential for optimization. So at the current time the plugins are always in the search sorted by the number of their downloads. In my opinion, more sorting and filtering categories should be added there to make the search
to further improve plugins and to give good but maybe not so well known plugins a better visibility.
Thank you for your interest and as always, I welcome comments, ideas and criticism in the comments.
More articles
fromPasquale Brunelli
Your job at codecentric?
Jobs
Agile Developer und Consultant (w/d/m)
Alle Standorte
More articles in this subject area
Discover exciting further topics and let the codecentric world inspire you.
Blog author
Pasquale Brunelli
Integration Specialist
Do you still have questions? Just send me a message.
Do you still have questions? Just send me a message.