dio_cookie_manager 2.0.0-prev1 copy "dio_cookie_manager: ^2.0.0-prev1" to clipboard
dio_cookie_manager: ^2.0.0-prev1 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/");
}
145
likes
0
points
52.6k
downloads

Publisher

verified publisherflutter.cn

Weekly Downloads

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