ocookie 0.0.1 copy "ocookie: ^0.0.1" to clipboard
ocookie: ^0.0.1 copied to clipboard

Cookie and Set-Cookie parser and serializer.

🍪 Ocookie #

Cookie and Set-Cookie parser and serializer.

Installation #

To install ocookie add the following to your pubspec.yaml

dependencies:
  ocookie: latest

Alternatively, you can run the following command:

dart pub add ocookie

Baisc Usage #

final cookie = Cookie('name', 'value');
print(cookie.serialize()) // name=value
print(Cookie.parse('a=b;b=c')); // {a: b, b: c}

Utils #

  • Cookie.serialize - Serialize a cookie instance to string.
  • Cookie.parse - Parse client-side cookie header map.
  • Cookie.fromString - Parse a set-cookie string to Cookie instance.
  • Cookie.splitSetCookie - Split a string of multiple set-cookie values into a set-cookie string list.

API Reference #

See the API documentation for detailed information about all available APIs.

License #

MIT License

0
likes
130
points
158
downloads

Publisher

unverified uploader

Weekly Downloads

Cookie and Set-Cookie parser and serializer.

Repository (GitHub)
View/report issues

Topics

#cookie #parser #serializer

Documentation

API reference

Funding

Consider supporting this project:

github.com
opencollective.com

License

MIT (license)

Dependencies

http_parser

More

Packages that depend on ocookie