安装:

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

相关文章:

  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2022-02-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2021-07-11
  • 2021-06-08
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案