1、上传文件接口如何测试
参考: https://blog.csdn.net/qq_37049050/article/details/75286197
参考2:https://www.jianshu.com/p/3c790e98ea8d
参考3:https://blog.csdn.net/SHSQLDLL/article/details/80291617
参考4:https://www.cnblogs.com/titan5750/p/6879114.html
参考5:https://blog.csdn.net/lion19930924/article/details/50955409?locationNum=4&fps=1
二、遇到的问题记录
1、按照这种方式,没有成功上传,错误如下:https://www.cnblogs.com/titan5750/p/6879114.html
j
问题1:接口地址给错了
问题2:
{"errorCode":21001,"message":"材料编号有误,请核查!","systemId":"material-center","login":false,"statusCode":"21001","total":0,"data":[],"newdata":null}
应该是 参数没有给全,继续研究(参照:https://blog.csdn.net/qq_37049050/article/details/75286197)
三、问题最终解决
参照了官方文档,具体代码如下:
参考的官方说明和地址:
http://docs.python-requests.org/en/master/user/advanced/#post-multiple-multipart-encoded-files