Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Can the issue be reproduced with the default theme (daylight/midnight)?
- I was able to reproduce the issue with the default theme
Could the issue be due to extensions?
- I've ruled out the possibility that the extension is causing the problem.
Describe the problem
fetchSyncPost
在实现中,对于一切 data
参数不加区分地设定为 json
类型,但是后端 API 中,有些请求(如 upload, putFile 等)的body的类型是 HTMLForm。所以在使用这个 API 发这些请求的时候会出现错误。
见:
Line 25 in 83fbf8c
和:
Line 87 in 83fbf8c
Expected result
请修复 fetchSyncPost
的实现,让其对不同类型更加鲁棒。
Screenshot or screen recording presentation
No response
Version environment
- Version: 3.0.4
- Operating System: win10
- Browser (if used): No
Log file
无
More information
No response
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-]Bug | 插件 API `fetchSyncPost` 的 `data` 参数不能只是 json[/-][+]Bug | 插件 API `fetchSyncPost` 的 `data` 参数类型问题[/+]🎨 fix #10715
[-]Bug | 插件 API `fetchSyncPost` 的 `data` 参数类型问题[/-][+]Add `FormData` type for `data` in `fetchSyncPost` [/+][-]Add `FormData` type for `data` in `fetchSyncPost` [/-][+]Add `FormData` type for `data` in `fetchSyncPost` [/+][-]Add `FormData` type for `data` in `fetchSyncPost` [/-][+]Add `FormData` type for `data` in `fetchSyncPost`[/+]