requests

安装:

pip install requests

参考文档 https://requests.readthedocs.io/en/master/

GET:

# get(url, 字典格式的参数)
r = requests.get('https://api.github.com/user', {"name": "GetcharZp"})

# Content
r.text

# JSON, 通过该方法可以直接将返回的结果转化为字典
r.json()

POST:

# 类似于 GET
Aspire to inspire until I expire