Insomnia REST Client
insomnia.rest
insomnia.rest
Nothing wrong with Postman at all, but I just like Insomnia's cleaner and less cluttered UI. However, even as a regular user, sometimes I find the 'Send' button can be a lot more prominent than it is. The green '200 OK' response next to the Send button looks more like a button, and I keep inadvertently clicking on it to send my requests off!
And when starting out with a fresh workspace, the 'Create New' prompt looks like a button that you can click to create a new query, but it isn't - you still have to use the hotkey to do so. Small improvements in the UI like that will go a long way to making this my default 'go to' API testing tool.
Does Insonmia or other REST clients support tabs?
I also like the collab features and ability to save the API spec alongside the source code if you wish. They also have some cloud sharing for teams that I haven’t played with.
Personally, I prefer Postman but because of that bug it's basically useless for me.
:PROPERTIES:
:header-args: shell :var PASSWORD=not :var USERNAME=narb :var AUTH_URL="nova.example.com:5000/v2.0/tokens"
:END:
...
#+NAME: get-openstack-token
#+BEGIN_SRC shell :cache yes :results verbatim
export DATA='{
"auth" : {
"tenantName": "'"$TENANT_NAME"'",
"passwordCredentials": {
"username": "'"$USERNAME"'",
"password": "'"$PASSWORD"'"
}
}
}'
curl -s $AUTH_URL \
-H "Content-Type: application/json" \
--data "$DATA" | jq -r ".access.token.id"
#+END_SRC
#+RESULTS[be67...]: get-openstack-token
: deadbeefdeadbeefdeadbeef
...
#+BEGIN_SRC shell :var AUTH_TOKEN=get-openstack-token
curl -H "X-AUTH-TOKEN: $AUTH_TOKEN"
...
Not to discount tools such as postman / insomnia or other built-in editor tools like restclient-mode, they are all fantastic toolsSome quick reasons why I found this works best for me:
* Org-mode is already great as a dedicated note-taking tool
* This is immediately compatible with existing CLI examples or output from tools that offer 'export as cURL' -- this is especially useful if I want to reverse engineer an api request by browser is making
* Easy to export to an html/wiki document for immediate consumption by others with working CLI examples
* Composable with other CLI tools like jq and xmllint
* Plain-text files are easy to version control
Alternatively I prefer to assume that it'll give our commentary more value if we provide some helpful context.
If our goal is to share technologies that we think are useful, we have options to make that goal more successful.
I use a lot of httpie [1] and jq [2] - sometimes a GUI is nice to show other humans who might... mmhh... not like the CLI that much.. things in a more "eye pleasing way".
As usual with these tools YMMV.
Not for other humans, for me as well.
It has all those shiny colors, icons, columns, drag & drop, that makes it easier and faster, when you have more complicated task.
I guess it all depends, but GUI in general is a step forward.
Sometimes it's more convenient to use command line, and sometimes (especially with more complicated queries that you want to modify and fiddle with a lot) a GUI is more convenient.
[1] https://mitmproxy.org/ [2] https://github.com/rofl0r/proxychains-ng
https://blog.jetbrains.com/phpstorm/2017/09/editor-based-res...
I think it combines the best of both worlds.
1. Env switching. I believe this is available on other clients, but it feels very intuitive in insomnia.
2. The ease of using results from other calls and making method chains. When testing something locally, I can make a POST call and then click on my GET call and have it implicitly GET the id that was just created.
3. Computed values -- putting in uuids or timestamps for each new call without having to change them. I looked at the api and the code to add your own seems pretty straightforward.
4. Input data types are toggleable, but the form stays the same. This bugged the shit out of me with Postman: I'd fill out a form with my content body only to find I had marked the wrong content type, switched it, and saw Postman present me with a blank form.
[0]: https://www.getpostman.com/docs/postman/collections/data_for...
Postman also has bulk edit of form requests..
I feel like postman is more fully featured so I'm sticking with it for now.
If you're sending requests that can return very long json responses, Insomnia can lock up and force you to restart it.
Paw is a pretty good native alternative but it's macOS only, doesn't have a free tier beyond a short trial period, and has some UI quirks that made me ultimately go back to Insomnia despite the electron borne downsides.
If Insomnia could offload the request response parsing/formatting to a WebAssembly module it would be perfect.
I can't recall ever having a problem with curl and a large response.
Yes, these others are probably doing something like parsing the response and making it pretty and that's where the problem is. But just sayin'. (Also, most of the time, curl's memory usage can be measured in kilobytes. Again, just sayin'.)
I'll tolerate a good electron app, but I'll always prefer native.
With this, VSCode, Slack & Boostnote - a good portion of my daily work is done in Electron apps and I can't say I'm itching to switch to native alternatives.
Definitely appreciate how people have issues with it, but it doesn't seem like it's going away and hopefully will only get better.
When it's used well (VS Code) it works like anything else, when it isn't (Atom) it doesn't.
It might use more memory, but as developers we usually have GBs of spare RAM, isn't it there to be used anyway? A lot of apps on Linux are available because Electron makes porting easy.
I think it's a great technology.
Taking your "used well" example of VS Code as an example, any Mac user trying to seriously use it for more than a minute will find plenty of problems. The scroll bars are thicker and more boxy and do not auto-hide; the cursor appearance is different (the line is too thick and fades in and out instead of just blinking); the page-up and page-down behavior is different (the cursor moves rather than just staying in place; infuriating!); what gets selected when you double- or triple-click on bits of code is different. Some people can get over this sort of stuff and use it anyway. I, personally, cannot.
I know VS Code is highly customizable; is it possible you installed some customizations to make it behave more Mac-like?
Some of the behavior you mention is also by design.
P.S.: what's a good editor for the Mac in your opinion, then? Sublime Text is good and native, but the file explorer shows folders first instead of folder content mixed like everywhere else on macOS--and that's _actually_ infuriating.
You mean these things weren't happening, or they were but they didn't bug you? :P
> what's a good editor for the Mac in your opinion, then?
I use Coda 2. It does too much with its built-in terminal and MySQL client and Git client and FTP client and manuals, but it's mostly possible to just use it as a code editor and ignore the rest. (The one thing that it doesn't have built in that I wish it did is a GDB debugger.) It was pretty crashy right after High Sierra was released, but the developers eventually ironed those out.
So you're using an outdated editor because you don't like VS Code's scrollbars (which can be themed, btw)?
It's a dead product.
It hasn't changed in 5 years.
I mean, by your standard, how much has vi changed over the last 35 years or so? Is vi dead?
Totally different things.
For what it is worth, I'm on one now and am experiencing the same issues.
I won't say I didn't intend to stir the shit a little with this comment and figured I'd rightly it would be downvoted or flagged into oblivion, but now it's my most upvoted comment in the last week or so. So people seem to appreciate it a lot more than anticipated. Maybe every Electron app that shows up on HN needs an "Electron warning!" subthread.
So what? Did it in any way foster interesting discussion? No, just the opposite. It's bad and you should feel bad.
Six subthreads and seventeen total subcomments so far, so apparently so. Exclusive of this particular subthread, of course.
I don't mean to "shit on" Electron, it has it's uses - I just avoid it when possible.
(I'm not affiliated with them, just like the product)
It's not bad at all, Postman's UI is _slightly_ more intuitive, but Insomnia's is good, too.
I use it because they offer a .deb installer and Postman doesn't offer a package installer for Linux.
Intuitiveness is very much in the eye of the beholder ;)
So nice to capture a flow of commands and notes in a single plain text file
vscode-restclient[1] is a fantastic piece of work. You create a .http file and write what looks like raw HTTP requests (syntax highlighting and autocomplete included). The biggest "feature" for me is that it's incredibly source control friendly. All of our services have documentation in the form of an HTTP "script" right alongside the code.
Wonderful!
- vim: https://github.com/aquach/vim-http-client
- emacs: https://github.com/pashky/restclient.el
Seems to me it's hard to overcome the advantage of being able to immediately work with and edit response data. What are the major advantages of these standalone clients?
Super easy to use, and it's trivial to save and organize common requests since...it's all just text :)
Supports variables as well. Check out the readme for examples. Can't recommend it highly enough.
thank you, guys :)
Moving App 'Insomnia.app' to '/Applications/Insomnia.app'. Password:
I can't find the app anywhere after sudo gave up because I don't have rights. I did get this nice message though:
insomnia was successfully installed!https://github.com/getinsomnia/insomnia/releases/tag/v5.12.4
Btw, this is the official source code:
https://github.com/getinsomnia/insomnia
But I find it a bit odd that I couldn't find a link to the source code on the website.
Edit: There is one, I just wasn't looking very well.
[1] http://docs.aws.amazon.com/general/latest/gr/signature-versi...