Skip to content

[docs] Add an HTTP/2 example to the discussion page#363

Open
fluffy-dev wants to merge 1 commit into
pgjones:mainfrom
fluffy-dev:docs/http2-example
Open

[docs] Add an HTTP/2 example to the discussion page#363
fluffy-dev wants to merge 1 commit into
pgjones:mainfrom
fluffy-dev:docs/http2-example

Conversation

@fluffy-dev

Copy link
Copy Markdown

The HTTP/2 docs page explains the TLS/ALPN and h2c details but never actually shows how to run a server, so I added a short example.

It covers a minimal ASGI app served two ways:

  • with TLS (h2) — generating a self-signed cert and pointing --certfile/--keyfile at it
  • without TLS (h2c) — both the Upgrade route and --http2-prior-knowledge

Each has the exact hypercorn command and a curl line to check the protocol is actually negotiated. I also noted that any ASGI app (FastAPI/Starlette) works, since the original issue was about serving FastAPI over HTTP/2.

Docs only, no code changes.

Resolves #250.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation needs an http2 example

1 participant