Over the Christmas break I merged in the pull requests and resolved the open issues on the scala-uri project. Many thanks to GentlemanHal and hgiddens for your contributions!
scala-uri 0.2 is now available in maven central repository and 0.3-SNAPSHOT is in the OSS Sonatype repository.
The main new feature is now the ability to control the encoding of spaces via an implicit val
. The default behaviour of scala-uri is still to percent encode spaces as %20
:::scala
import com.github.theon.uri.Uri._
val uri:Uri = "http://theon.github.com/uri with space"
uri.toString //This is http://theon.github.com/uri%20with%20space
However by specifying the following implicit val
, you can instead have spaces encoded as pluses:
:::scala
import com.github.theon.uri.Uri._
import com.github.theon.uri.Encoders._
implicit val encoder = PercentEncoder + EncodeSpaceAsPlus
val uri:Uri = "http://theon.github.com/uri with space"
uri.toString //This is http://theon.github.com/uri+with+space
Comments !