409 points · by ace33 · 4y ago · 210 comments
The VS Code Rest Client extension https://marketplace.visualstudio.com/items?itemName=humao.re... is great for testing and debugging APIs.
You create a "my_request.http" file that contains something like
POST https://example.com/comments HTTP/1.1
content-type: application/json
{
"name": "sample",
"time": "Wed, 21 Oct 2015 18:27:50 GMT"
}
First line is the method and url, then headers, then a newline, then the request body.Hit ctrl+alt+p, the request is sent and you see the response in a side pane. Everything is encoded and decoded properly.
You can organize your tests under multiple files and folders.
I cannot recommend this extension enough, it has made my life so much easier.
"We support two types of variables, one is Custom Variables which is defined by user and can be further divided into Environment Variables, File Variables and Request Variables, the other is System Variables which is a predefined set of variables out-of-box."
However, what I can't figure out is if it supports programmatic variable setting. I have an API where I need to retrieve a token from an endpoint before using it for every other endpoint, and I'm using Postman's test scripts to set that token as an environment variable before sending all the other requests so they can all use it. I don't see a way to replicate that with this extension.
We also wanted something text based, that could easily be integrated in a CI [2] for instance. We are using Hurl to test our web application (~2M unique visitors/month). Very happy with it currently, but there are really a lot of very good tools in this space (as we can see in these comments).
[1] https://hurl.dev
My main gripe with Postman and Insomnia isn't actually the web based UI, but the lock-in. You can't access the files that they store their data in easily. Postman especially tries to push people towards getting their per-seat 'cloud' subscription if you want to share sets of HTTP requests.
But using this text-based REST client, you don't have this file lock-in.
For IntelliJ this feature is actually built in, I believe it uses the same syntax.
But gRPC support is not built yet. It's on the roadmap.
Super straightforward.
Which is an open source, cross platform alternative to postman.
A few other observations on comments that I read through:
1. Postman leans towards adding UI affordances instead of hiding them. This can irritate experienced developers at times who already know the complexities of HTTP or other protocols but that is really how new developers find their way around. So while it is attractive to have 1000 options hidden behind a command line interface, nobody uses 995 of those features. We are getting better at building experiences for both experienced and new developers. Also, I don’t believe reading man pages of git or curl is a better experience.
2. Performance is a huge area for improvement. More to come in subsequent releases this year.
3. Our roadmap is community driven: https://github.com/postmanlabs/postman-app-support/issues. Raising more investment helps us do more. We have built a business model around doing the maximum for every developer on the planet while also providing value to companies so we can charge for it and continue development. I find it fair that companies spend hundreds of millions of dollars on salaries can pay some money for improving their productivity by spending in developer tools.
4. API Development is a huge and growing area and developers are spending more and more time working with APIs rather than their IDEs. API Design, documentation, and testing are areas that a large number of developers tell us they wish they had better tooling for. Most of their time is spend pointlessly in trying to figure out how an API works (in some cases whether an API even exists). We decided to take Postman in those areas even though paradoxically it might lead to “less” Postman usage. (The faster people figure out an API the fewer number of calls they have to send)
5. Finally, it is good to see here a call for fewer features which we insist internally as well. Unfortunately at some point some part of the community is upset that we are NOT adding features (just see the gRPC thread on our issue tracker!). We don’t see issues to remove features as much as we have requests to fulfill. We do remove features consciously but it is a hard problem, so we default to adding them slowly.
That said, we are looking into iOS and mobile devices right now - a smaller problem set before we look into native clients.
https://github.com/lnenad/probster
It's golang + gtk so it uses 30MB of ram. I've made a website https://probster.com with some screenshots. I plan on making a barebones version available for download soon for all platforms, just gotta get around to it because I don't have a lot of experience with delivering desktop apps.
My team ended up moving to Paw but that has been a bit problematic since it only supports osx, so some team members are also using insomnia which doesn't seem to be much better in my opinion.
I recently found httpyac[1]. It's a cli and file based http client similar to the IntelliJ HTTP client, but has plugins, hooks and allows scripting through javascript blocks. It seems to have everything I need but I haven't used it much yet. It also already supports gRPC.
One of the issues I found with http clients I looked into is that they often don't provide enough functionality to hook into the request process. Either before or after a request is executed to add to the headers or parameters of the request or getting the results of the request. Postman did provide some of that but that's one area I wanted more from any client I looked at. I could of course simply wrap curl in a script but at that point, I will be maintaining my own jerryrigged version of an http client for my team.
https://www.jetbrains.com/help/idea/http-client-in-product-c...
https://www.jetbrains.com/help/idea/exploring-http-syntax.ht...
[1] https://marketplace.visualstudio.com/items?itemName=humao.re...
Never heard of httpyac. Looks pretty nice. We've been using httpie, which works great, but it's missing nice-to-have stuff like graphql and oauth2, which I've had to build in myself.
One of the first things I learned working professionally is that of it’s possible you need to force all engineers to use the same OS. No one will ever agree on one Linux distro. No one wants to develop on Windows (unless you’re developing for Windows). So you should but everyone a MacBook. The time saved by reducing duplicated work in getting things working on your OS more than pays for the Apple tax. As for personal OS preference - get over it.
Why stop there? You may also deny engineers admin access so they can't install unauthorized software alternatives to the one true path(tm). The policy is really solidified by not revising the list of blessed software for many years[1], assuring there are no support tickets, and your stack is truly 'stable'. Why let software engineers choose which software they'd like to install?
1. Eclipse is on the list, always has. Jetbrains requires skip-level approval as support is still experimental. What is VSCode? No one knows the process of adding it to the approved packages.
Personally I like the VSCode REST Client best: https://marketplace.visualstudio.com/items?itemName=humao.re...
In my experience Insomnia suffers from some of the same bugs that affect Postman[1], but at least they don't do the scummy things that Postman does, for example locking you out of your _personal_ Postman account if your ex employer forgets to pay their business subscription (if anyone at Postman is reading this: that's the reason I left and will never come back).
PS I swear that some time ago I saw that Paw was now available for Linux and Windows as well, but I just went to their website and it still says "exclusively built on macOS", I'm really confused now.
[1] e.g.both Postman and Insomnia break when you import multiple API keys https://swagger.io/docs/specification/authentication/api-key...
I often have unsaved state because I’m testing a specific case that I don’t want to save
I find that httpkit (or just mitmproxy) often gives me decent insight to the actual requests.
I don't know about altering requests "in flight" - I typically re-issue the request via curl or my application server (eg: rails console or debugger breakpoint).
Strongly considering purchasing httpkit - but so far I've just needed it occasionally.
I feel like postman etc is closer to println Debugging, while just intercepting the traffic is more like using a real debugger. But I guess I can see why some like postman etc for exploration - so far i prefer swagger for that (or soapui for xml/soap - preferably running soapui under httpkit for the best of both worlds).
It's built on a plugin architecture, does gRPC, GraphQL, JDBC, Ws, et.al. Other plugins allow sharing of workspaces to various services. Written in Java/JavaFX, brew or chocolatey install.
We use all those features:
- HTTP requests
- Mock servers (to test async requests which call back a webhook endpoint)
- Workspaces: private and public
- Monitors, alerts and integrations
I’m excited by the direction Postman has been taking over the years.
Most of commenters in the thread seem to think that Postman is still in the “lightweight cURL replacement GUI” market, like so many of the alternatives mentioned. I think this is wrong - Postman has now has moved to an upper market where requirements are more advanced and complex.
Btw - we use both Postman & cURL
Plus, if the API moves, we had to (manually) find and fix dozens of Postman tests.
I'd appreciate it, if you have some insights that can move my team forward.
We do use the one way Postman -> Github integration though. Every time a change is done, it is committed to a dedicated Github repo. We use it as a backup in case anybody messes up the scripts
As a consequence of our API Design we're also able to reuse our existing Typed APIs in gRPC services: https://docs.servicestack.net/grpc
I always dreamed of something like this and was more than surprised that it doesn't seem to exist. Does anyone know of a similar solution for node.js?
on one hand, it has all these really great features. I would be half as productive without it.
on the other hand, it’s so, so annoying with all these updates and cloud features and something or other all the time :(
Web app: https://hoppscotch.io
The main reason I dislike Postman is not actually the web based interface, but the fact it keeps its data files to itself to try and push teams to using their cloud offerings.
If a HTTP client stores its requests and configuration as a plain text file, it becomes really easy to manage it alongside a codebase and share between teams. But alas.
That said, I have seen a paid version of postman be used in a company and it worked really well. But it's an expense.
An alternative is what is mentioned in the top comment at this time, VS Code's Rest Client or Intellij's built-in rest client, which use plain text files (.http files) with plain text based HTTP request definitions. Those can be executed directly, without hidden functionality, and stored / updated / diffed in git.
Another alternative - but this is restricted to HTTP based APIs - is Swagger/OpenAPI combined with Swagger-UI, which is both a documentation page and a demo page. The UX isn't the best, but it works very well imo.
> Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
I guess I’m no longer their target user. Back to curl/httpie.
> The developers stating they had no intention of changing this for "security reasons" before closing the Github issue sealed the deal.
The issue is still open with no response from the developers that mentions security reasons.
I have to admit I'm quite surprised that VS Code (which is also an electron app) is relatively fast and resource-sensitive. Having open a few applications in my daily workflow, moderate resource consumption is getting an important selling point for me.
Always happy for any feedback!
I’m really hoping they don’t go the 1Password route and kill their native macOS product to move everyone to the cross-platform one.
[0] I'm lead developer for macOS app :)
And I found the whole experience a bit confusing in terms of user flow
But it takes seconds to get up and running with requests-html. And it can do anything Postman can do and more. I have no idea how people in organizations use postman though.
It's really handy for generating test suites to hand to people who don't necessarily have the skills to write Python / node / whatever code. Have worked at places where certain changes needed a Postman collection alongside for people to manually verify that it works.
(Also handy for un-coder people to make test suites, obvs.)
(Also handy as a quick-and-dirty "view this data via the API" when you don't yet have a web UI etc.)
curl + bloomRPC + graphiQL covers all my bases nowadays.
I just use Browser's Network tab for that nowadays. CORS can be a trouble at times, but that can be avoided with a few tweaks.
And get Python that I can start iterating on. They have lots of languages.
I used to use Postman but the clarity of the code is so much easier to see what’s happening vs postman imo.
For someone like me who just does this occasionally I found it rather useful.
- Didn't choke when having ~50 request 'tabs' open
- Didn't try to sell me shit
Granted, Postman had quite a lot more tools in its box for scripting, testing, sharing etc. but I didn't need those.
Insomnia has got a bit fatter since then, but it remains more responsive than Postman was.
Because it's OSS they didn't feel the need to bog down a perfectly functional product to drive a valuation up.
It's a carbon copy of what Postman started as.
You can download packages of extensions. I would recommend that you do it for the ones you love.
But the browser APIs are constantly changing, forcing you to keep running in order not to fall behind.
[1]: https://web.archive.org/web/20190322170311/https://github.co...
Very excited to try this out.
Glad to see lots of comment with alternatives here.
[0] https://github.com/postmanlabs/postman-app-support/issues/81...
In the end it also leaves me with a git'able artifact to share with others.
It lets you write the api, test it and generate the documentation all from the same source of truth file.
I built it to solve my biggest pain points with existing tooling like BloomRPC and gRPCurl - they were difficult to use for anything more complicated than "Hello, World". I also couldn't find any tools that would let me send protobuf-encoded requests via HTTP/1.1 rather than gRPC - there are a couple options now, but as far as I know none of them support both that and gRPC.
When I'm exploring a new API I just do it in jupyter with python/requests. This way, when I figure out how to do what I want I already have some working code. I can see how this workflow would be a pain in a static language, but for dynamic languages I don't understand why more people don't do it this way.
And it allows you to load swagger/openapi spec which makes the exploration phase rather trivial.
disclaimer: I also hate using Postman because it's too big, complex, slow
- JSON (without schema) vs Protobuf (with schema)
- Msgpack (without schema, compressed) vs Protobuf (with schema)
- JSON + gzip or brotli encoding vs Protobuf + gzip or brotli
- JSON + gzip or brotli encoding vs Msgpack + gzip or brotli
Compression will erase a lot of the gains even with a schema-defined protocol, but if your goal is low CPU (just serialization) then msgpack is usually good enough.
Not disappointed !
I'm a relatively young developer so I'm hoping to gain some insight from this mindset I see all too often.
What I’ve noticed is that developers are incredibly annoyed when their tools don’t work well. Developers use their tools a lot, and when a tool starts “misbehaving” (resource hungry, sporadic failure, non ergonomic design etc) they are exposed to that failure constantly. This constant exposure can create intense feelings (either love or hatred) and nowhere to express them, so it will spill out on slack and on HN threads (eg count yourself lucky if you’ve worked somewhere that nobody has ranted about terraform).
So take these criticisms with a grain of salt. The creators of tools and the users aren’t always aligned on the most important thing to do next and you only have so much money and time to execute on as a company so you have to make trade offs.
Like a quote about Microsoft Office: A user only ever uses about 10 percent of the features. The problem is that all users use different 10 percents.
Why not do the same thing with software?
Release 10 different flavors of Microsoft Word and let people choose the one they want.
People only use 10% of word, but this does not mean that you can partition all users in batch of "10% of features".
If you want to satisfy everyone, you have to make every possible combination of "10% of word features". Which is impossible.
So it's much easier to just combine all features in one product and try to give the user a good interface to find easily the feature they are looking for.
It would be interesting if we had a similar system for GUI applications. The interface would need to be generated to only show features that are included
You need to build a solution to problem x. You do that and then the project is over. Outside of maintenance work it's a stable code base and you the developer move onto a new problem.
Examples of this in my mind are things like uBlock Origin. I'm not getting bombarded with updates on that project. It does the job it sets out to do, and it does it well.
It seems, though, that when working in a business that you'll have many users with many use cases, you'll be competing with other software companies, the temptation is there to add the one feature more to please the user or compete a little better.
this becomes a very specific problem each group of developers / business must answer and maybe the ideal case becomes less realistic to achieve or at least have a general answer for.
If you take VC funding you're in for another world of pain, which is that your company may be perfectly profitable but if it isn't growing at a rate your investors want you'll get kicked out and replaced by someone who will take "product growth" seriously. In other words, Postman needs more paying customers so it needs to become more of a "one size fits all" tool.
One might think that the solution is to simply work on another product after Postman was declared "done," but it seems like nobody seriously attempts this anymore because the SaaS model is so much more profitable.
I agree that this and feature flags are a great way to toggle things, but unfortunately for apps like Postman you still feel the load in the download and load times for the app. Usually those fancier features are also more code/data which results in straight increases in memory/disk regardless of whether you use something or not.
In IDEs like Jetbrains and VisualStudio, a lot of features are built like plugins which are a separate download and installation and allow you to disable them. I wonder if apps could take that approach to to keep more people happy.
Rather than build one console app that has 50 features, you build 10 console apps with 10 features each. The complexity of each component stays small while your capabilities as a user grow and grow.
This worked originally as the Unix designers were free to organize their code however made sense according to their philosophy. But Conway's Law comes into play in organizations, where there is always a hierarchy centred around one or two main products. Rather than one or two people making 10 different apps, it's multiple teams making a couple apps each. They don't communicate between each other well or understand the other components, and it all has to fit inside one program.
That makes sense in terms of CLI utilities where text/files is the standard input/output, or APIs where json/xml/format-of-today is the standard input/output, but how would you do this with GUI tools? I'd love it if there was a solution, but I'm not aware of one.
Many suites of software use a standard format for things (like .obj/.fbx for graphic object/animation, or .wav for music production), but there is usually not a pipeline as in "pipe this output from this software into that input to that software" like we do with CLI utilities, and if there is, that pipeline is not standarized nor open for extension. Will it ever be possible? I hope so, but I don't see how it can be right now.
Historically the Amiga was quite nice here with systems using AREXX to communicate (but not embed), and Linux/POSIX has things like DBUS for the same (but less flexibly since there's no middleware between the two for coordinating control between systems, the components need to know about one-another directly - kinda).
VS Code gained its success mainly because of it's extensibility through extension
If one just reads the HN solely, they might get the impression that Google is the most evil company on the earth since the beginning of time. In reality very few people actually have that kind of view. It's mostly toxic people need to find a target to unleash their toxicity; on HN it's Google.
Since you are young, I'd advise to be very cautious on internet. Never take internet crowd as a proper sample of real world population. It's very skewed and almost always not in a good way.
Can't win I guess.