python的requests库
时间: 2023-08-27 08:15:01 浏览: 79
回答: Python的requests库是一个非常实用的HTTP客户端库,它可以方便地发送HTTP请求并处理响应。根据restful风格的设计,requests库提供了get()、put()、delete()、post()四个方法来发送不同类型的请求。使用方式和参数如下所示:
- 发送GET请求:
```python
import requests
res = requests.get(url, params=None, **kwargs)
```
- 发送POST请求<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [python - requests库详解](https://blog.csdn.net/weixin_45932368/article/details/121508547)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [python requests库详解](https://blog.csdn.net/qq_19956683/article/details/126100222)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文