http_cookie_store 0.0.2 copy "http_cookie_store: ^0.0.2" to clipboard
http_cookie_store: ^0.0.2 copied to clipboard

Process and store cookies in a cookie store, or directly use it as a http client.

example/http_cookie_store_example.dart

import 'package:collection/collection.dart';
import 'package:http_cookie_store/http_cookie_store.dart';

void main() async {
  final client = CookieClient();

  await client.get(Uri.parse('https://www.nytimes.com/'));

  await client.get(Uri.parse('https://edition.cnn.com/'));

  groupBy(client.store.cookies, (c) => c.domain).forEach((key, value) {
    print("$key:");
    for (var cookie in value) {
      print('\t$cookie');
    }
  });

  print(client.store[CookieKey('geoData', Uri(host: 'cnn.com'))]);

  client.close();
}
4
likes
150
points
82
downloads

Publisher

unverified uploader

Weekly Downloads

Process and store cookies in a cookie store, or directly use it as a http client.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection, http, quiver

More

Packages that depend on http_cookie_store