Drop-in HTTP/1.1 + HTTP/2 + HTTP/3 for Phoenix, Bandit, Finch, Req, Cowboy, and hackney.

Server (replaces Bandit / Cowboy)

{Gale, plug: MyPlug, port: 4000}
{Gale, plug: MyPlug, port: 443, scheme: :https, certfile: "...", keyfile: "...", http3: true}

config :app, AppWeb.Endpoint, adapter: Gale.PhoenixAdapter

Client (replaces Req / Finch / hackney)

Gale.get("https://example.com")
Gale.get("https://example.com", protocols: [:http3, :http2, :http1])
{Gale.Finch, name: MyFinch}
Gale.Hackney.get(url)

H1/H2 still run on Bandit and Finch. H3 uses Hex quic (quic_h3) plus the Zig QPACK NIF. Production H3 in front of Phoenix can still terminate at Caddy; in-VM H3 is http3: true with certs.

Summary

Functions

blake3(bin)

See Gale.Native.blake3/1.

child_spec(opts)

delete(url, opts \\ [])

See Gale.HTTP.delete/2.

get(url, opts \\ [])

See Gale.HTTP.get/2.

get!(url, opts \\ [])

See Gale.HTTP.get!/2.

h3_frame_decode(bin)

See Gale.Native.h3_frame_decode/1.

h3_frame_encode(kind, payload)

See Gale.Native.h3_frame_encode/2.

head(url, opts \\ [])

See Gale.HTTP.head/2.

nif_loaded?()

patch(url, opts \\ [])

See Gale.HTTP.patch/2.

post(url, opts \\ [])

See Gale.HTTP.post/2.

post!(url, opts \\ [])

See Gale.HTTP.post!/2.

put(url, opts \\ [])

See Gale.HTTP.put/2.

qpack_decode(bin)

qpack_encode(headers)

quic_parse_long_header(bin)

See Gale.Native.quic_parse_long_header/1.

quic_varint_decode(bin)

See Gale.Native.quic_varint_decode/1.

quic_varint_encode(n)

See Gale.Native.quic_varint_encode/1.

request(method, url, opts \\ [])

See Gale.HTTP.request/3.

start_link(opts)

xxh3(bin)

See Gale.Native.xxh3/1.