h1_client (h1 v0.2.1)

View Source

HTTP/1.1 client connect helpers.

Opens a TCP or TLS socket, starts an h1_connection in client mode, transfers socket ownership, activates the connection, and waits for the connected event (matching h2's connect/activate/wait_connected sequence).

Summary

Types

host/0

-type host() :: string() | binary() | inet:ip_address().

Functions

connect(Host, Port, Opts)

-spec connect(host(), inet:port_number(), map()) -> {ok, pid()} | {error, term()}.