@@ -8,10 +8,12 @@ defmodule URI do
8
8
9
9
This module provides functions for working with URIs (for example, parsing
10
10
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.
12
14
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.
15
17
"""
16
18
17
19
@ doc """
@@ -501,9 +503,9 @@ defmodule URI do
501
503
defp hex_to_dec ( _n ) , do: nil
502
504
503
505
@ 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 .
505
507
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
507
509
given, it will parse and validate it. If the string is valid, it returns
508
510
`{:ok, uri}`, otherwise it returns `{:error, part}` with the invalid part
509
511
of the URI. For parsing URIs without further validation, see `parse/1`.
0 commit comments