Skip to content

Instantly share code, notes, and snippets.

@gvolpe
Created September 14, 2015 14:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gvolpe/6f91d905ed94136a2198 to your computer and use it in GitHub Desktop.
Save gvolpe/6f91d905ed94136a2198 to your computer and use it in GitHub Desktop.
Parse URL Parameters
import java.net.URLDecoder
def parseUrlParameters(url: String) = {
url.split("&").map( v => {
val m = v.split("=", 2).map(s => URLDecoder.decode(s, "UTF-8"))
m(0) -> m(1)
}).toMap
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment