Hackney 4.0.0 released

hackney 4.0.0 is out. The release trims the client down: HTTP/2 and HTTP/3 are now delegated to two separate Erlang libraries, erlang_h2 and erlang_quic, so hackney no longer ships its own framing, HPACK / QPACK codecs, control streams or state machines. The HTTP/3 path is fully RFC 9114 compliant via quic_h3, with ALPN negotiation and Alt-Svc auto-discovery, and is reached through the same hackney:request/5 API as HTTP/1.1.

The bundled metrics subsystem is removed. In its place a Go-style middleware chain runs around hackney:request/1..5, configured per request with {middleware, [Fun, ...]} or globally via application:set_env(hackney, middleware, [...]). Users plug in prometheus, telemetry or anything else without hackney owning the policy. Migration recipes are in the new Middleware Guide.

Release notes and full changelog: Release hackney 4.0.0 · benoitc/hackney · GitHub

10 Likes

Very happy with all the great progress! (but I’m also looking forward for the version numbering to stabilize so that we can eventually see these versions recognized as compatible in all the libraries dependency specifications, and then finally be able to use them :smiley:)

4.0 was the last move on it. API is now stable and i’m happy about the way code is now organized. Next itteratins will be more about adding features and ensuring we can build a true web platform in erlang.

3 Likes

Oh, that’s very, very nice, great work! This is btw the right way to implement middlewares, like Elixir’s Tesla does and Elixir’s Req does not.

Time to implement an HTTP cache middleware for Hackney on the model of TeslaHTTPCache!