HACKER Q&A
📣 andriosr

How do you debug REST APIs?


I started using Postman, but it's slowness, resources consumptions (>1GB RAM) and trying to do too many things always made me sad.

Then came Insomnia, I use it today, but it seems that it's becoming the new Postman, trying to do a lot of things and becoming slower every day.

I'm sticking to cURL, bash and jq as much as I can, but sometimes I need to see a catalog of endpoints, see a more structured list, then I have to resort to Insomnia.

Do you feel the same? What is your workflow?


  👤 andrewrothman Accepted Answer ✓
I use Insomnia as well. There's a few Postman features I miss, but I like that it's slightly less heavy, and I like the Insomnia UI a lot better. They've been responsive to my feedback over email, and I think they have the right idea.

VS Code proves that a developer tool with nice UI, lots of features, and workable performance is possible. What's yet to be seen is if it can be done to the same degree by a team without the resources of Microsoft or Slack.

I'd love to see Insomnia implemented as a PWA. I would bet there's some technical challenges involved there, but PWAs have the advantage of re-using the browser instance I already have running to do my work and read HN.


👤 sethammons
For endpoints we write, we debug them in an acceptance test. We spin up a service and its dependencies and write tests that hit endpoints and assert behavior.

If I need to manually hit endpoints for some reason, I usually just put the curl calls into some text or note file and copy-paste into a terminal.

If I need deeper debugging, I use tcpdump and wireshark. In this case I can either try to capture live traffic or hit the endpoints with curl.


👤 soulchild37
If you are using Mac, I recommend https://paw.cloud/client . It is native (no Electron slowness) and worked pretty well for me.

👤 tucaz
I use Fiddler. It’s simple and has been since I can remember.

👤 2rsf
What do you mean by debug ? for ad-hoc testing during development everyone around me sticks to Postman.

For things that involves flows or logic I tend to write code, Python in my case but everything works, with some basic test framework around it. You can even use Robot framework or Karate if you don't want to write real code


👤 takinola
Consider using nGrok as well. It allows you to replay calls with a single click.

👤 potta_coffee
I use HTTPie, much easier than cURL (most of the time).

👤 shoo
tangent: has anyone found migrating away from REST APIs to some other way of specifying & implementing APIs seems like a net win in terms of the tradeoffs involved? (might be a bit context-dependent in terms of how much control (if any) you have over the various client and server component in the ecosystem)