https://github.com/scalajs-io/tough-cookie
RFC6265 Cookies and Cookie Jar for node.js
https://github.com/scalajs-io/tough-cookie
node nodejs npm npm-package scala scalajs tough-cookie
Last synced: 4 months ago
JSON representation
RFC6265 Cookies and Cookie Jar for node.js
- Host: GitHub
- URL: https://github.com/scalajs-io/tough-cookie
- Owner: scalajs-io
- License: apache-2.0
- Created: 2017-02-08T05:06:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-17T23:11:31.000Z (about 6 years ago)
- Last Synced: 2025-01-17T22:42:26.878Z (5 months ago)
- Topics: node, nodejs, npm, npm-package, scala, scalajs, tough-cookie
- Language: Scala
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ToughCookie API for Scala.js
================================
[tough-cookie](https://www.npmjs.com/package/tough-cookie) - RFC6265 Cookies and Cookie Jar for node.js#### Description
RFC6265 Cookies and Cookie Jar for node.js
### Build Dependencies
* [SBT v1.2.x](http://www.scala-sbt.org/download.html)
### Build/publish the SDK locally
```bash
$ sbt clean publish-local
```### Running the tests
Before running the tests the first time, you must ensure the npm packages are installed:
```bash
$ npm install
```Then you can run the tests:
```bash
$ sbt test
```### Examples
```scala
import io.scalajs.JSON
import io.scalajs.npm.toughcookie._val cookie = Cookie.parse("key1=value1")
println(s"cookie: ${JSON.stringify(cookie)}")
//=> cookie: {"key":"key1","value":"value1","creation":"2017-02-08T06:25:57.717Z"}
```### Artifacts and Resolvers
To add the `ToughCookie` binding to your project, add the following to your build.sbt:
```sbt
libraryDependencies += "io.scalajs.npm" %%% "tough-cookie" % "0.5.0"
```Optionally, you may add the Sonatype Repository resolver:
```sbt
resolvers += Resolver.sonatypeRepo("releases")
```