Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - marcelog/ex_rfc3986: RFC3986 URI parser

RFC3986 URI parser. Contribute to marcelog/ex_rfc3986 development by creating an account on GitHub.

Visit SiteGitHub - marcelog/ex_rfc3986: RFC3986 URI parser

GitHub - marcelog/ex_rfc3986: RFC3986 URI parser

RFC3986 URI parser. Contribute to marcelog/ex_rfc3986 development by creating an account on GitHub.

Powered by 0x5a.live ๐Ÿ’—

Build Status RFC3986

An URI parser trying to be strictly compatible with RFC3986.

This project uses ex_abnf with the official uri grammar

Example

iex> RFC3986.init # Call this one first to initialize the grammar.
iex> {_matched_uri, _not_matched_input, result} = RFC3986.parse 'http://user:[email protected]:8812/docs/stable/elixir/Enum.html?k1%2A=v1&k2=v2#fragment'
iex> result
%RFC3986.Result{
    fragment: 'fragment',
    host: 'elixir-lang.org',
    host_type: :reg_name,
    password: 'pass',
    port: 8812,
    query: 'k1%2A=v1&k2=v2',
    query_string: %{'k1%2A' => 'v1', 'k2' => 'v2'},
    scheme: 'http',
    segments: ['docs', 'stable', 'elixir', 'Enum.html'],
    type: :authority,
    userinfo: 'user:pass',
    username: 'user'
  }

Using it with Mix

To use it in your Mix projects, first add it as a dependency:

def deps do
  [{:ex_rfc3986, "~> 0.2.7"}]
end

Then run mix deps.get to install it.

License

The source code is released under Apache 2 License.

Check LICENSE file for more information.

Elixir Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.