cooky 1.0.2
cooky: ^1.0.2 copied to clipboard

An HTTP Cookies implementation for the client.

example/example.dart

import 'package:cooky/cooky.dart' as cookie;

void main() async {
  // Create a session cookie:
  cookie.set('key', 'value');

  // Create a cookie that expires in a week:
  cookie.set('key', 'value', maxAge: Duration(days: 7));

  // Create a cookie that is valid for a certain path and domain:
  cookie.set('key', 'value', path: '/test', domain: 'test.com');

  // Read a cookie:
  var value = cookie.get('key');
  print(value);

  // Delete a cookie:
  cookie.remove('key');
}
3
likes
90
pub points
71%
popularity

Publisher

Unknown

An HTTP Cookies implementation for the client.

Repository (GitLab)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on cooky