Skip to content
Welcome to the Gluegun documentation!

Limitations

Gluegun wraps Erlang Gun and is not available on the JavaScript target.

Gun process ownership matters. Requests and WebSocket frames are asynchronous messages sent to the process that owns or awaits the Gun stream unless request options redirect replies. The high-level client helpers consume those messages on the calling process for the duration of send and then return; they do not spawn a separate consumer.

Use connection.close for normal teardown — Gun sends its shutdown signal and waits for the process to exit. Use connection.shutdown only when a connection is suspected stuck; it terminates the Gun process immediately without graceful close. Outstanding streams are cancelled in either case.

High-level client helpers collect bodies in memory

Section titled “High-level client helpers collect bodies in memory”

Use low-level request and message APIs for streaming or advanced Gun flows. The client helpers are for regular HTTP responses that can be collected in memory.

Gun supports WebSocket over HTTP/1.1. Gluegun rejects HTTP/2 in websocket.upgrade_with_protocol by checking the protocol returned from connection.await_up before calling Gun.

Advanced TLS options may require future typed additions.

Use the API reference to check the current public surface before reaching for Gun options directly.