Feature
Most of the time I'm using buf curl it is against services I am actively developing/testing, locally on my machine. Those services are exposing their servers over HTTP, not HTTPS. It is annoying that I have to pass --http2-prior-knowledge all the time! I'd love to be able to do buf curl http://localhost:8888/my.service/Endpoint. There are several different approaches that could solve this:
- Providing an env var that lets me set
--http2-prior-knowledge, such that I don't need to pass it when writing out the command myself
- Provide a configuration file that does the same thing
- Automatically trying HTTP2, without me having to pass the flag
I'm unsure if there's a way of detecting HTTP2 prior to making the actual request. But intuitively, I'd expect there to be some sort of way! You could also argue that it'd even make sense to automatically enable HTTP if reflection is active, as HTTP2 is a prerequisite for reflection to even work.
Feature
Most of the time I'm using
buf curlit is against services I am actively developing/testing, locally on my machine. Those services are exposing their servers over HTTP, not HTTPS. It is annoying that I have to pass--http2-prior-knowledgeall the time! I'd love to be able to dobuf curl http://localhost:8888/my.service/Endpoint. There are several different approaches that could solve this:--http2-prior-knowledge, such that I don't need to pass it when writing out the command myselfI'm unsure if there's a way of detecting HTTP2 prior to making the actual request. But intuitively, I'd expect there to be some sort of way! You could also argue that it'd even make sense to automatically enable HTTP if reflection is active, as HTTP2 is a prerequisite for reflection to even work.