Python 的 HTTP 客戶端庫,Requests 2.6.0 發布

y37f 9年前發布 | 6K 次閱讀 Requests

Requests 是一個 Python 的 HTTP 客戶端庫。

示例代碼:

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

Requests 2.6.0 發布,此版本現已提供下載:https://github.com/kennethreitz/requests/archive/v2.6.0.zip

更新內容如下:

Bug 修復

  • Fix handling of cookies on redirect.

  • Fix error when requests is an install_requires dependency and python setup.py test is run. (#2462)

  • Fix error when urllib3 is unbundled and requests continues to use the vendored import location.

  • Include fixes to urllib3's header handling.

  • Requests' handling of unvendored dependencies is now more restrictive.

新特性和改進

  • Support bytearrays when passed as parameters in the files argument. (#2468)

  • Avoid data duplication when creating a request with str, bytes, orbytearray input to the files argument.

更多內容請看更新日志

來自:http://www.oschina.net/news/60539/requests-2-6-0

 本文由用戶 y37f 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!