Python 模拟postman上传文件

最近工作需求:写的程序要用到python模拟postman操作,基于flask框架

代码很简单 但是百度一半天:

import requests

files = {'skFile': open(r"C:UsersTOPFEELPictures.jpg", 'rb')}

r = requests.post("http://192.168.4.178:5000/upload", files=files)
原文地址:https://www.cnblogs.com/givemelove/p/9878532.html