From 0cbdd2fc95e58b197909e313748d0870c05a8da7 Mon Sep 17 00:00:00 2001 From: Seudin Kasumovic Date: Fri, 4 May 2018 21:10:44 +0200 Subject: Allow IP tuple for host #152 --- src/gun.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gun.erl') diff --git a/src/gun.erl b/src/gun.erl index f628199..a4ef417 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -125,14 +125,14 @@ %% Connection. --spec open(inet:hostname(), inet:port_number()) +-spec open(inet:hostname() | inet:ipaddress(), inet:port_number()) -> {ok, pid()} | {error, any()}. open(Host, Port) -> open(Host, Port, #{}). --spec open(inet:hostname(), inet:port_number(), opts()) +-spec open(inet:hostname() | inet:ipaddress(), inet:port_number(), opts()) -> {ok, pid()} | {error, any()}. -open(Host, Port, Opts) when is_list(Host); is_atom(Host) -> +open(Host, Port, Opts) when is_list(Host); is_atom(Host); is_tuple(Host) -> do_open(Host, Port, Opts). -spec open_unix(Path::string(), opts()) -- cgit v1.2.3