Limitations
Erlang target only
Section titled “Erlang target only”Gluegun wraps Erlang Gun and is not available on the JavaScript target.
Connection ownership matters
Section titled “Connection ownership matters”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.
close versus shutdown
Section titled “close versus shutdown”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.
WebSocket over HTTP/2 is unsupported
Section titled “WebSocket over HTTP/2 is unsupported”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.
TLS option surface is intentionally small
Section titled “TLS option surface is intentionally small”Advanced TLS options may require future typed additions.
Use the API reference to check the current public surface before reaching for Gun options directly.