elm / url

Build and parse URLs. Useful for HTTP and "routing" in single-page apps (SPAs)
https://package.elm-lang.org/packages/elm/url/latest/
BSD 3-Clause "New" or "Revised" License
75 stars 43 forks source link

Please expose Url.Parser.prepareQuery #29

Closed robx closed 5 years ago

robx commented 5 years ago

My application requires me to handle query parameters somewhat generically (in particular, to handle query parameters with variable names). The exposed interface of Url.Parser doesn't support that.

Url.Parser internally uses:

prepareQuery : Maybe String -> Dict String (List String)

for the low-level query parameter parsing.

I'd be happy to reimplement this myself, but for the fact that it calls out to kernel code for percent-decoding, which I'm not permitted to do myself, and I'd be loathe to implement differently from core Elm.

Thus, please consider exposing a way to get at a full query parameter dictionary without jumping through hoops.

robx commented 5 years ago

I found this somewhere else in the meantime