Survey of Emacs HTTP Clients
I was aware of restclient, but for a recent requirement, it did not seem to be the best option. Looking around, it looks like Emacs has not one but several solutions for an integrated HTTP client.
An HTTP client is used to work with HTTP endpoints like REST endpoints. The first tool in the box is curl
and it works admirably well, but sometimes, you have multiple requests. This is where more featured clients like Postman or Insomnia come in. But, for an Emacs user, obviously, the best solution is within.
1. Restclient
The most mature Emacs solution - it's strength in the straightforward use. The structure of the entires almost mimick what the real HTTP protocol looks like, so that's nice.
2. emacs-request
A more programmatic http client which is structured like clients in other programming languages.
3. Verb
Verb is very different from the other options here. It is meant to end-user first, like restclient. The real strength though here is that you organize your requests using Org.
What does this get you?
You can use children subtree's to override templates in parent trees. This allows you to organize multiple requests sharing base-url, query path, headers, params etc allowing you to fine-tune what you really need out of every request. Super neat.
4. ob-http
Http plugin for Org Babel. Does exactly what it says on the tin.
5. Walkman
Walkman is another user-facing package. The interface is a bit neater - headers go into a list below the main request line and the request body is managed as a src block. But, the real advantage to using this one, is that it runs everything over curl and allows you to export the request as a curl command.
Very useful if you only want to use Emacs to construct the request and then send it from elsewhere. As far as I can see, none of the other options allow you to export to curl.
6. Concluding Thoughts
That's not all though. There are even more packages that are slightly older, or not actively maintained. For example: httprepl. Normally this should not be an issue in Emacs land, but you might as well go with the other options.
And, the game is not over yet. Even though there are so many libraries, I couldn't find one which makes management of params easier, especially when you have lengthy ones that need to be url-encoded. There are open issues in Restclient and ob-http but they don't seem to be going anywhere.
So, maybe you right your own package? Let me know if you do, I'll add it to this list. :-)