Skip to content

Instantly share code, notes, and snippets.

@piuccio
Last active October 12, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piuccio/93b281de8837fb55610c to your computer and use it in GitHub Desktop.
Save piuccio/93b281de8837fb55610c to your computer and use it in GitHub Desktop.
Handle query strings in scala
val queryString = {request.queryString.filter(_._2.exists(_.nonEmpty)).map { p =>
"%s=%s".format(p._1, p._2.head.urlEncoded)
} ++ List(s"api-key=$key")}.mkString("&")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment