Cookie and Set-Cookie parser and serializer.
To install ocookie
add the following to your pubspec.yaml
dependencies:
ocookie: latest
Alternatively, you can run the following command:
dart pub add ocookie
final cookie = Cookie('name', 'value');
print(cookie.serialize()) // name=value
print(Cookie.parse('a=b;b=c')); // {a: b, b: c}
Cookie.serialize
- Serialize a cookie instance to string.Cookie.parse
- Parse client-sidecookie
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.
See the API documentation for detailed information about all available APIs.