dio_cookie_caching_handler 0.0.8 dio_cookie_caching_handler: ^0.0.8 copied to clipboard
An Dio interceptor stores cookies and puts back to every requests made.
Dio cookie handler/manager. #
Manager Dio Cookies in non web environments.
Features #
- Stores cookies in single file when changed
- Keep cookies in memory to provide when needed
- Supports Expires, Max-Age attributes.
- No Other attribute support.
- Cookies loaded from file when needed. No Async/Await setup needed
Getting started #
pubspec.yaml
dependencies:
dio_cookie_caching_handler: ^0.0.7
Run this command
flutter pub get
Usage #
Setup:
import 'package:dio/dio.dart';
import 'package:dio_cookie_caching_handler/dio_cookie_caching_handler.dart';
import 'package:flutter/foundation.dart';
final dio = Dio();
if (!kIsWeb) {
dio.interceptors.add(cookieCachedHandler());
}