mobiworx / urlifier   0.3

MIT License GitHub

partially typesafe url construction

Scala versions: 2.10

urlifier

urlifier covers basic operations to construct urls that are typechecked.

Usage example

import urlifier.syntax._

val german = param("language", "de")
val version = param[Long]("version")
val foobar = ("foo" -> "bar")
      
val url1 = (http || "mobiworx".de) ? german & version(1) & foobar
val str1 = url1.toString // "http://mobiworx.de/?language=de&version=1&foo=bar"

val url2 = (https || "www.domain".com | 8080 | "some" | "path" ) ? param("foo", "bar")
val str2 = url2.toString // "https://www.domain.com:8080/some/path?foo=bar"

SBT

"de.mobiworx.urlifier" %% "urlifier" % "0.3"