当前位置: 移动技术网 > IT编程>脚本编程>Python > python用post访问restful服务接口的方法

python用post访问restful服务接口的方法

2019年01月09日  | 移动技术网IT编程  | 我要评论

飓风营救2在线观看,阿三瘦马,极品射门靴

具体代码如下:

import requests
import json
data={"ids": ["00007190","00007191"]}

url="http://xxxxx"
data_json = json.dumps(data)
headers = {'content-type': 'application/json'}
response = requests.post(url, data=data_json, headers=headers)
print(response.text)

以上这篇python用post访问restful服务接口的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网