-
-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python中添加header头无法上传 #403
Comments
import requests
headers = {
'Content-Type": "multipart/form-data',
'Accept': 'application/json',
'x-requested-with': 'XMLHttpRequest',
}
|
{"status":false,"message":"\u670d\u52a1\u5f02\u5e38\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5","data":{}} |
前往文件夹 |
看起来是没有获取到文件拓展名称,检查一下你这个文件上传的对不对吧,python 我不太懂。 |
删除header头可以上传 |
将content-type注释以后也可以正常上传,并以token账户传输,但识别成form-data后无法正常读取,不太理解是为什么, @wisp-x ,是python的构造出的请求有问题吗 |
@txuw 抱歉,我对 python 不是很了解。 |
The text was updated successfully, but these errors were encountered: