Skip to content

Avoid having to pass --http2-prior-knowledge for every http URL #4629

Description

@torkelrogstad

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:

  1. 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
  2. Provide a configuration file that does the same thing
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions