dio_cookie_manager 2.0.0-beta1 copy "dio_cookie_manager: ^2.0.0-beta1" to clipboard
dio_cookie_manager: ^2.0.0-beta1 copied to clipboard

outdated

A cookie manager for Dio, which supports persistent cookies in RAM and file.

example/example.dart

import 'package:dio/dio.dart';
import 'package:dio_cookie_manager/dio_cookie_manager.dart';
import 'package:cookie_jar/cookie_jar.dart';

main() async {
  var dio = Dio();
  var cookieJar = CookieJar();
  dio.interceptors.add(CookieManager(cookieJar));
  await dio.get("https://baidu.com/");
  // Print cookies
  print(cookieJar.loadForRequest(Uri.parse("https://baidu.com/")));
  // second request with the cookie
  await dio.get("https://baidu.com/");
}
139
likes
0
pub points
99%
popularity

Publisher

verified publisherflutter.cn

A cookie manager for Dio, which supports persistent cookies in RAM and file.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cookie_jar, dio

More

Packages that depend on dio_cookie_manager