Tools & Makers: Insomnia HTTP Client
I’m a big fan of IndieHackers, a website run by Courtland Allen (and now owned by Stripe) that features interviews with independent developers and small businesses who tell the story of how they built and launched their products. One recent interview that stood out to me was with Gregory Schier, the Canadian developer that created Insomnia, a multi-platform desktop HTTP client for developers to test APIs. Building a company that has APIs front and center myself I was interested in both the product and its backstory. In this article I’ll first be taking Insomnia for a spin and then give a summary of Gregory’s story and his advice for aspiring indie developers and startups.
Most developers use
curl to test APIs and when they want something more visual Postman is probably the most common choice. Insomnia’s description read a lot like Postman’s so a comparison is inevitable. Both are desktop apps implemented with web technology (Electron) and have the same audience. Even the business model is the same; both give away their app for free (Insomnia is even GPL-licensed!) and charge for a premium plan with cloud-based syncing and sharing functionality.
After downloading, installing and starting Insomnia on my Mac I noticed it looks very nice and clean with a modern dark UI. I was eager to type in an HTTP URL right away but noticed I had to create a named request in my workspace first. In this way Insomnia enforces a very structured workflow in which developers set up and organize their requests first, which can be positive or negative depending on your preferences.
Luckily if you have a machine-readable API definition you can import it so you don’t have to set up all requests in your client manually. Insomnia supports their own format along with Postman v2, HAR and Curl (OpenAPI/Swagger is notably absent). If your API is stored as a WebAPI-type object in CloudObjects (and we’ve written a tutorial for that) you can use the Postman Collection Exporter to get data in a format that can be imported into Insomnia. Why not try it with CloudObjects’ own Object API 1.0 right now: Go to the API’s directory page, scroll down until you see the Export section in the bottom, right click on
postman.json and choose to copy the link target URL. Then launch Insomnia, open the main dropdown menu in the top left, go to Import/Export, choose From URL, paste the link and confirm. Voilà, all API methods have been imported and are ready to be tested!
Insomnia uses a three column layout with the workspace on the left, the request in the middle and the response on the right. Postman, on the other hand, aligns request and response vertically. Insomnia’s UI looks a bit cleaner and minimalist, but admittedly Postman has more features and is more configurable and extensible. That’s not a judgement of which is better, it’s once again a matter of preference. A great outstanding feature I found in Insomnia is the integration of XPath and JSONPath as a single command line directly below the response. The response view updates dynamically while typing so I can easily filter down and access subsets of more complex response objects. One recently added feature that also makes Insomnia stand out but which I haven’t tested yet is the support for OAuth.
I’m definitely intrigued and will continue testing Insomnia along with Postman, curl and other API tooling in order to improve my own workflow and also make sure that CloudObjects users will be able to use our products in combination with any of their favorite third party tools.
Now as I said in the beginning, there’s also an interesting backstory behind Insomnia. As a developer at sendwithus, Gregory Schier initially developed an internal testing client for their own API. This turned into a side-project first and now it’s a full-time endeavor by one single person, a solopreneur. Compare that with Postman, who - at the time of writing - list 17 people and a dog on their about page!
In the interview with IndieHackers’ Courtland, Gregory shared a bit of advice:
- SaaS companies should have annual plans to get more money in the bank earlier.
- Invest in hosted services, don’t waste your time maintaining servers and databases and tracking users (that’s what CloudObjects is preaching, too!).
- HackerNews can help a lot with initial traction when launching a product for developers; for Insomnia it brought around 40.000 visits.
- Don’t leave your side projects after building them, always practice launching products to real users!
- Don’t spend time refactoring code before knowing people like what you’re building. If you’re a single developer only you need to understand your own code.
I hope you enjoyed this post. We’re planning to cover more developer tools as well as share advice for developers and entrepreneurs. Let us know what kind of content you’d love to see most!