StackOverflow 文档 python-requests 教程 python 请求入门 阅读回复 阅读回复 Created: November-22, 2018 response = requests.get("https://api.github.com/events") text_resp = response.text JSON 响应 :对于 json 格式的响应,该包提供了一个内置的解码器 response = requests.get('https://api.github.com/events') json_resp = response.json() 在空响应或不可解析内容的情况下,此方法将引发 ValueError。 读取状态代码其他请求方法