如何解决将 json 列表作为 Flutter/Dart 中 Dio Post 方法的头参数传递
我想在 FLutter/Dart 中的 Dio post 方法的 header 参数中发送这样的购物车项目列表。
https://www.example.com?cart=[{"product_id": "8","category_id": "19","shop_id": "11","shop_name": "shopName","quantity": "2","descriptions": "test"}]
但 dio 将每个字段转换为类似 cart[0][product_id]=8
https://www.example.com?cart[0][product_id]=8&cart[0][category_id]=19&cart[0][shop_id]=11&cart[0][shop_name]=shopName&cart[0][quantity]=2&cart[0][descriptions]=test
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。