# Hackney 4.1.0 - WebTransport client

**URL:** <https://erlangforums.com/t/hackney-4-1-0-webtransport-client/5667>\
**Category:** Library Updates\
**Tags:** http2, http, webtransport, websocket, http3, hackney, to-catch-all\
**Created:** [May 29, 2026, 9:37pm UTC](https://erlangforums.com/t/hackney-4-1-0-webtransport-client/5667 "2026-05-29T21:37:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benoitc](https://erlangforums.com/user_avatar/erlangforums.com/benoitc/32/211_2.png) [@benoitc](https://erlangforums.com/u/benoitc)\
**Post date:** [May 29, 2026, 9:37pm UTC](https://erlangforums.com/t/hackney-4-1-0-webtransport-client/5667/1 "2026-05-29T21:37:42Z")

</div>

hackney 4.1.0 adds a WebTransport client. It mirrors the existing WebSocket  
client, so moving from WebSocket to WebTransport is a matter of swapping the  
ws\_ prefix for wt\_:

```
{ok, Conn} = hackney:wt_connect(<<"https://example.com/wt">>),
ok = hackney:wt_send(Conn, {binary, <<"hello">>}),
{ok, {binary, <<"hello">>}} = hackney:wt_recv(Conn),
hackney:wt_close(Conn).

```

It runs over HTTP/3 (QUIC) by default, with HTTP/2 as an option. A session is  
the analog of an HTTP/2 connection: one session multiplexes many bidirectional  
or unidirectional streams (wt\_open\_stream/2, wt\_stream\_send/3,4,  
wt\_stream\_recv/2,3) plus unreliable datagrams (wt\_send\_datagram/2). There is  
no custom wire framing, so it interoperates with any WebTransport server. The  
guide documents both the client and a server handler.

This is a drop-in addition, no breaking changes from 4.0.x.

```
{hackney, "4.1.0"} %% rebar
{:hackney, "~> 4.1"} # mix

```

WebTransport Guide:

> <https://github.com/benoitc/hackney/blob/master/guides/webtransport_guide.md>

Changelog: [hackney/NEWS.md at master · benoitc/hackney · GitHub](https://github.com/benoitc/hackney/blob/master/NEWS.md)  
Release: [Release hackney 4.1.0 · benoitc/hackney · GitHub](https://github.com/benoitc/hackney/releases/tag/4.1.0)  
Hex: [hackney | Hex](https://hex.pm/packages/hackney)
