处理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)

相关文章:

  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-02-04
相关资源
相似解决方案