# Gun

> Erlang HTTP/1.1, HTTP/2 and Websocket client

Source: https://talira.ai/catalog/gun-h0c80c5e
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / http clients](https://talira.ai/categories/libraries/http-clients), [languages / erlang](https://talira.ai/categories/languages/erlang)
- Licence: ISC[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Loïc Hoguin](https://talira.ai/orgs/loic-hoguin.md)

Gun is an open source [Erlang](https://talira.ai/catalog/erlang-xsdkv450.md) HTTP client with support for HTTP/1.1, HTTP/2 and Websocket, by Loïc Hoguin of Nine Nines, who also makes [Cowboy](https://talira.ai/catalog/cowboy-edtr4jzc.md). It keeps a permanent connection to the server and reopens it as soon as the server closes it, every connection is supervised, and it can connect through any combination of SOCKS and HTTP proxies.

## Links

- GitHub: https://github.com/ninenines/gun
- Docs: https://ninenines.eu/docs/en/gun/2.8/guide/

## Problems it solves

- make HTTP/2 requests from an Erlang or Elixir application
- keep a Websocket connection open to a server from Erlang/OTP and reconnect automatically
- HTTP client in Erlang that works through a SOCKS proxy

## Features

- HTTP/1.1, HTTP/2 and Websocket client
- permanent connection that reopens when the server closes it
- connections supervised automatically
- connects through any mix of SOCKS and HTTP proxies
- user guide in PDF and HTML and man pages for the function reference

## Trust

Overall: 0.61 out of 1.
Signals: maintenance 1.00, adoption 0.60, momentum 0.25, community 0.67, backing 0.30, extensibility 0.00.

- last commit 4 days ago
- 64 commits in the last 90 days
- 949 GitHub stars
- 47 contributors
- accepts sponsorship (Github, Custom)
- backed by Loïc Hoguin

## Related

- Works with [Erlang](https://talira.ai/catalog/erlang-xsdkv450.md)

## Alternatives

- [hackney](https://talira.ai/catalog/hackney-msg5q265.md): An HTTP client for Erlang. Simple, reliable, fast.
- [ibrowse](https://talira.ai/catalog/ibrowse-pzr0dh4e.md): HTTP client for Erlang with connection pools and streaming
- [HTTPoison](https://talira.ai/catalog/httpoison-cgavy63p.md): Yet another HTTP client for Elixir, powered by hackney
- [Mint](https://talira.ai/catalog/mint-9ymp6msa.md): Functional, low-level HTTP/1 and HTTP/2 client for Elixir
- [Req](https://talira.ai/catalog/req-x4psqdpb.md): A batteries-included HTTP client for Elixir
- [Finch](https://talira.ai/catalog/finch-wt98daa2.md): Performance-focused HTTP client for Elixir

## Sources

[^1]: https://github.com/ninenines/gun/blob/master/README.asciidoc (checked 28 Nov 2026)
[^2]: https://github.com/ninenines/gun/blob/master/LICENSE (checked 28 Nov 2026)
