For example for a current url like http://localhost:4000/cosmetic/products?_utf8=✓&query=perfume&page=2,
I would like to get:
[_utf8: “✓”, query: “perfume”, page: “2”]
I tought I could use @conn.assigns.params but I realized it may contain other stuff that I don’t need here. I just want only the params present in the url after the ?.
This triggers parsing them if they haven’t been parsed yet.
To actually get the params from the query string, one could just do conn.query_params IIRC. They will return as a map though, not as a keywordlist (which would be dangerous anyway as it would open your system for atom overflow attacks)
Thanks for the warning. When converting the Map to a Keyword List, I will then match only the allowed query param keys. I think this will avoid atom overflow attacks.