Skip to content

Commit ad524f5

Browse files
committed
Improve URI docs
1 parent 237263c commit ad524f5

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/elixir/lib/uri.ex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ defmodule URI do
88
99
This module provides functions for working with URIs (for example, parsing
1010
URIs or encoding query strings). The functions in this module are implemented
11-
according to [RFC 3986](https://tools.ietf.org/html/rfc3986).
11+
according to [RFC 3986](https://tools.ietf.org/html/rfc3986) and it also
12+
provides additional functionality for handling "application/x-www-form-urlencoded"
13+
segments.
1214
13-
Additionally, the Erlang [`:uri_string` module](`:uri_string`) provides certain functionalities,
14-
such as RFC 3986 compliant URI normalization.
15+
Additionally, the Erlang [`:uri_string` module](`:uri_string`) provides additional
16+
functionality such as RFC 3986 compliant URI normalization.
1517
"""
1618

1719
@doc """
@@ -501,9 +503,9 @@ defmodule URI do
501503
defp hex_to_dec(_n), do: nil
502504

503505
@doc """
504-
Creates a new URI struct from a URI or a string.
506+
Creates a new URI struct by parsing and validating a string or from an existing URI.
505507
506-
If a `%URI{}` struct is given, it returns `{:ok, uri}`. If a string is
508+
If a `%URI{}` struct is given, it returns `{:ok, uri}` as is. If a string is
507509
given, it will parse and validate it. If the string is valid, it returns
508510
`{:ok, uri}`, otherwise it returns `{:error, part}` with the invalid part
509511
of the URI. For parsing URIs without further validation, see `parse/1`.

0 commit comments

Comments
 (0)