Hackney 2.0.0 released

hackney 2.0.0 has been released! This is the first stable release of the 2.x series.

hackney is an HTTP client for Erlang. Version 2.0 is a major rewrite where each connection runs in its own gen_statem process.

Key Features

  • HTTP/2 support - Automatic protocol negotiation via ALPN, multiplexing, header compression
  • HTTP/3 support - Experimental QUIC/HTTP3 via lsquic (opt-in)
  • Process-per-connection - Clean isolation, automatic cleanup on crashes
  • Redesigned connection pool - Per-host limits, TCP-only pooling, connection prewarm
  • Automatic decompression - Transparent gzip/deflate with {auto_decompress, true}

New in 2.0.0 (since beta.1)

  • HTTP 1xx informational responses (#631)
  • HTTPS proxy support (#795)
  • Proxy authentication callback (#799)
  • hackney:peercert/1 to get SSL peer certificate (#599)
  • stream_to process is now set as connection owner for async requests (#646)
  • Many bug fixes (see changelog)

Requirements

Erlang/OTP 27+

Links

Feedback welcome!

18 Likes

correct migration link is Migration Guide — hackney v2.0.1

1 Like

hackney 3.0.3 released

Restores function-based streaming body support - both stateless fun() and stateful fun(State) forms now work correctly with send_body/2.

4 Likes