这是我的代码:
params = {
"zipFile":"123456.zip",
"projectName" : "test"
}
dispatch = r.post("http://biqatest.baidu.com/dispatch/project/upload",files = params)
如您所见,它是一个帖子请求。
但响应是:
405
>Request method 'GET' not supported
这很奇怪,为什么?
答案 0 :(得分:0)
file = {'file': open('yourzipfile.zip', 'rb')}
data = {'projectName': 'test'}
dispatch = r.post("http://biqatest.baidu.com/dispatch/project/upload",files=file, data=data)