Pages.PageUrl

Same as a Url in elm/url, but slightly more structured. The path portion of the URL is parsed into a Path type, and the query params use the QueryParams type which allows you to parse just the query params or access them into a Dict.

Because elm-pages takes care of the main routing for pages in your app, the standard Elm URL parser API isn't suited to parsing query params individually, which is why the structure of these types is different.

type alias PageUrl =
{ protocol : Protocol
, host : String
, port_ : Maybe Int
, path : Path
, query : Maybe QueryParams
, fragment : Maybe String
}
toUrl : PageUrl -> Url