Requests Python 的 HTTP 客户端库

程序名称:Requests

授权协议: Apache

操作系统: 跨平台

开发语言: Python

Requests 介绍

Requests 是一个 Python 的 HTTP 客户端库。

支持的 HTTP 特性:

  • Keep-Alive & Connection Pooling

  • International Domains and URLs

  • Sessions with Cookie Persistence

  • Browser-style SSL Verification

  • Automatic Content Decoding

  • Basic/Digest Authentication

  • Elegant Key/Value Cookies

  • Automatic Decompression

  • Unicode Response Bodies

  • HTTP(S) Proxy Support

  • Multipart File Uploads

  • Streaming Downloads

  • Connection Timeouts

  • Chunked Requests

  • .netrc Support

  • Thread-safety

示例代码:

>>> r = requests.get('https://git.oschina.net', auth=('user', 'pass'))
>>> r.status_code
204
>>> r.headers['content-type']
'application/json'
>>> r.text
...

Requests 官网

http://python-requests.org/

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。