The other day I was looking for a Java or Scala library to help me parse a URL (with query string) and then build a new URL by changing the host and some of the parameters. I read a couple of posts on stackoverflow, but nothing seemed to fit the bill perfectly. I didn’t want to pull in a whole web framework just to do this one simple task, and I was a bit disappointed I couldn’t find a nice small Scala DSL for building URL query strings.

So I spent this weekend putting together a Scala library to fit that niche. The full details are on this github page, but here is a quick example of how you build a URL with it:

:::scala
val uri = "http://theon.github.com" ? ("param1" -> "1") & ("param2" -> 2)

Version 0.1 is now available in the Sonatype OSS Maven repository and should get synced to Maven Central soon. Check the github page for more details.