1、安装python第三方库requests
2、文件与其他参数需要分开传
data ={"参数1":"实参1",
"参数2":"实参2"}
元组类型(文件名,文件流,文件类型)
file_data={
"pic"????"yzm.png",open("文件路径","rb"),"image/png"),
"pic2"????"aa.py",open("文件路径","rb"),"text/py")
}
3、res = requests.post(url=url,data=data,files=file_data)

相关文章:

  • 2022-02-13
  • 2022-12-23
  • 2022-02-06
  • 2021-11-21
  • 2021-07-20
猜你喜欢
  • 2021-10-23
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
  • 2022-02-16
相关资源
相似解决方案