import requests #导入包
header= {'Authorization':self.token} #在头信息中添加token
param = {'productId':617,'currentUserId':1143}#这里是接口要传的参数,我用字典传
response = requests.post(self.url_add_Record,params=param,headers=header,) #发送requests接口请求将url、params、heads传进去
res = response.json()#返回的response转化成json串
print(res) #打印res
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)