Requests: HTTP for Humans¶

Requests: HTTP for Humans¶,第1张

Requests: HTTP for Humans — Requests 0.11.1 documentation

Requests: HTTP for Humans¶

Release v0.11.1. (Installation)

Requests is an ISC Licensed HTTP library, written in Python, for human beings.

Python’s standard urllib2 module provides most of
the HTTP capabilities you need, but the API is thoroughly broken.
It was built for a different time — and a different web. It requires an enormous amount of work (even method overrides) to perform the simplest of tasks.

Things shouldn’t be this way. Not in Python.

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

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/2091434.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-07-22
下一篇 2022-07-22

发表评论

登录后才能评论

评论列表(0条)

保存