python发送post请求含多文件与json字符串参数

 

data = {"jsonStr":jsonStr}
files = {
"log": open(filepath, "rb"),
"report": open(filepath, "rb")
}
respon = requests.post(url, data, files=files)

posted @ 2019-12-16 16:11  十年之约2025  阅读(1406)  评论(0)    收藏  举报