请问在3.0.8版本中发送formData还是只能用post方法么?put不支持?
New Issue Checklist
- [ ] I have searched for a similar issue in the project and found none
Issue Info
| Info | Value | |
|---|---|---|
| Platform Name | e.g. flutter / ios / android | |
| Platform Version | e.g. 1.5.0 / 12.0 / 9.0 | |
| Dio Version | e.g. 2.1.0 / 1.0.17 | |
| Android Studio / Xcode Version | e.g. Android Studio 3.3.2 / Xcode 10.2.1 | |
| Repro rate | e.g. all the time (100%) / sometimes x% / only once | |
| Repro with our demo prj | e.g. does it happen with our demo project? | |
| Demo project link | e.g. link to a demo project that highlights the issue |
Issue Description and Steps
Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.
FormData支持post、put、patch.
FormData支持post、put、patch.
FormData Dio支持发送 FormData, 请求数据将会以 multipart/form-data方式编码, FormData中可以一个或多个包含文件 .
FormData formData = FormData.from({ "name": "wendux", "age": 25, "file": await MultipartFile.fromFile("./text.txt",filename: "upload.txt") }); response = await dio.post("/info", data: formData); 注意: 只有 post 方法支持发送 FormData.//在readme中,这个是啥意思?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.