In Scala how do I build up a URL with query string parameters programmatically?
Also how can I parse a String containing a URL with query string parameters into a structure that allows me to edit the query string parameters programmatically?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The following library can help you parse and build URLs with query string parameters (Disclaimer: This is my own library): https://github.com/lemonlabsuk/scala-uri
It provides a DSL for building URLs with query strings:
You can parse a uri and get the parameters into a
Map[String,List[String]]like so: