执行命令
flutter pub get
3.1 get请求
var dio = Dio();
var response = await dio.get(‘https://xxx.com/test?id=12&name=wendu’);
print(response.data.toString());
《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》
【docs.qq.com/doc/DSkNLaERkbnFoS0ZF】 完整内容开源分享
response = await dio.get(‘https://xxx.com/test’, queryParameters: {‘id’: 12, ‘name’: ‘wendu’});
print(response.data.toString());
3.2 post请求
var dio = Dio();
var response = await dio.post(‘https://xxx.com/test’, data: {‘id’: 12, ‘name’: ‘wendu’});
3.3 并发请求
var dio = Di