我一直在尝试使用户登录并使用 dart 在 flutter 中注册 http。不知何故,我想让用户使用会话或 cookie 留在应用程序中。有人尝试过吗?
查看请求
pubspec.yaml
dependencies:
  requests: ^1.0.0
用法:
import 'package:requests/requests.dart';
// ...
// this will persist cookies
await Requests.post("https://example.com/api/v1/login", body: {"username":"...", "password":"..."} ); 
// this will re-use the persisted cookies
dynamic data = await Requests.get("https://example.com/api/v1/stuff", json: true); 
| 归档时间: | 
 | 
| 查看次数: | 14359 次 | 
| 最近记录: |