处理multipart/form-data 的java serverlet请求接口通过python实现
记住不要在头加:"Content-Type":"multipart/form-data"不然会报错
import requests
dt={"file":{},"message": "duotou","hashType": "md5","statMonth":"201910","version":"1","jobId":""}
url = "http://localhost/api/v1/recall/relater"
file={'file': open("./20191011.csv", 'rb')}
head={"app_id": "100031",
"seqno":"test200811230011"}
response = requests.request("POST", url, data=dt, headers=head,files=file)
print(response.text)