Skip to content

Commit

Permalink
Adds uri:host_port/1.
Browse files Browse the repository at this point in the history
  • Loading branch information
archaelus committed Jul 7, 2012
1 parent 3ab1533 commit 3e0869a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/uri.erl
Expand Up @@ -14,6 +14,7 @@
,to_string/1
,to_string/2
,full_host_iolist/2
,host_port/1
]).

-type scheme() :: atom().
Expand Down Expand Up @@ -61,3 +62,6 @@ to_string(Uri, Opts) when is_tuple(Uri), is_list(Opts) ->

full_host_iolist(Uri, Opts) when is_tuple(Uri), is_list(Opts) ->
uri_format:full_host(Uri, Opts).

host_port({_, _, Host, Port, _, _}) ->
{Host, Port}.

0 comments on commit 3e0869a

Please sign in to comment.