URL v0.3.0 URL View Source
Functions for parsing URLs
This module provides functions for parsing URLs. It is modelled on
Elixir’s URI
module but will also parse scheme-specific URIs such
as geo, data
tel and mailto.
Link to this section Summary
Functions
Parses a url and returns a %URL{} struct that
has the same shape as Elixir’s %URI{} with the
addition of the p:arsed_path
key
Link to this section Types
Link to this section Functions
Parses a url and returns a %URL{} struct that
has the same shape as Elixir’s %URI{} with the
addition of the p:arsed_path
key.
Example
iex> URL.parse(“geo:48.198634,-16.371648,3.4;crs=wgs84;u=40.0”) %URL{
authority: nil,
fragment: nil,
host: nil,
parsed_path: %URL.Geo{
alt: 3.4,
lat: 48.198634,
lng: -16.371648,
params: %{"crs" => "wgs84", "u" => 40.0}
},
path: "48.198634,-16.371648,3.4;crs=wgs84;u=40.0",
port: nil,
query: nil,
scheme: "geo",
userinfo: nil
}