Hacker News new | ask | show | jobs
by jetter 1335 days ago
If you are a minimalist, and are using VS Code, try https://marketplace.visualstudio.com/items?itemName=humao.re... which is a pure text syntax to describe API requests, and execute them right from the editor window. I now have api.http text file in every API-first project I am building and I love it.
2 comments

I like this one because it's easy to keep API workflows with my projects. The scripting ability here is phenomenal. However only really useful if you code in VS Code.
Jetbrains also provides a similar, albeit slightly incompatible syntax for the same thing.

In the end, I think hurl [0] is nicer, because it’s open source and it’s a cli tool (and VS code also has a syntax highlighting plugin for it), making it editor independent.

[0]: https://github.com/Orange-OpenSource/hurl

Do you have a single api.http file or do you you multiple {route}.http files?
Not OP but you can store all your routes in one file or multiple, it's up to you.

Personally what I do is I script out full API workflows in different files. So one file might login, then POST to add an object, then GET that object off an endpoint, then patch that endpoint, then trigger the GET object again.

Another workflow might login, upload an image, get that image, etc. For me the scripting is what makes this appealing.

But you could setup one file that documents and tests all your endpoints similar to Postman.