cookie - HTTP server cookie parsing and serialization.
Basic HTTP cookie parser and serializer for HTTP servers.
$ sbt clean publish-local
Before running the tests the first time, you must ensure the npm packages are installed:
$ npm install
Then you can run the tests:
$ sbt test
import io.scalajs.JSON
import io.scalajs.npm.cookie._
val cookies = Cookie.parse("foo=bar; equation=E%3Dmc%5E2")
println(s"cookies => ${JSON.stringify(cookies)}") //=> { "foo" : "bar", "equation" : "E=mc^2" }
To add the Cookie
binding to your project, add the following to your build.sbt:
libraryDependencies += "io.scalajs.npm" %%% "cookie" % "0.5.0"
Optionally, you may add the Sonatype Repository resolver:
resolvers += Resolver.sonatypeRepo("releases")