发送GET请求
...
response = requests.get(url=url, data=json.dumps(bodys), headers=headers)
...
发送POST请求
import requests
# 配置headers
headers = {'Content-Type':content_type, 'Token':token}
# 发起请求
response = requests.post(url=url, data=json.dumps(bodys), headers=headers)
# 读取响应
print(response.text)
http://docs.python-requests.org/en/master/
https://github.com/requests/requests