Can I use Url Query Parsers by themselves?

Since I’ve got a dependency on elm/url now anyway, I was trying to convert my query parameter parsing over in hopes it might cover more corners cases. However, I’ve found the library extremely awkward to deal with.

It seems there is no way to use the query parser directly. I must turn it into a path parser, and a path parser must match the entire path. Leading to hacking the url object:

{ location | path = “” }

Similarly, the API I am working with can return auth calls with a hash that has query like parameters. Leading to similar hack

{ location | path = “”, query = location.fragment }

Is there a cleaner way to do this?

4 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.