![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
requests
翱翔的赖思
这个作者很懒,什么都没留下…
展开
-
python使用requests.post方式send文件及参数的注意事项
大家在使用requests的post 方法提交数据时, 经常使用的方法如下:1. 提交python字典格式的数据>>> payload = {'key1': 'value1', 'key2': 'value2'}>>> r = requests.post("http://httpbin.org/post", data=payload)2. 提交J...原创 2018-09-26 18:05:53 · 10357 阅读 · 1 评论 -
当requests 遇到 gevent.monkey.patch_all(), wrap_socket does not accept server_hostname in python 2.7.x
开发环境: python 2.7.x requests gevent 并发编程在并发编程的开发过程中,我们常会在导入socket模块前使用gevent.monkey.patch_all(),以将涉及socket模块的IO设置为非阻塞。那么问题来了,当requests 遇到 gevent.monkey.patch_all(), 你可以也会遇到这样的异常信息:TypeE...原创 2018-12-25 09:44:26 · 1641 阅读 · 1 评论