mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge branch 'develop' of git://github.com/kennethreitz/requests into develop
This commit is contained in:
@@ -41,3 +41,4 @@ Patches and Suggestions
|
||||
- Den Shabalin
|
||||
- Alejandro Giacometti
|
||||
- Rick Mak
|
||||
- Den Shabalin
|
||||
@@ -3,13 +3,16 @@
|
||||
Frequently Asked Questions
|
||||
==========================
|
||||
|
||||
This part of the documentation covers common questions about Requests.
|
||||
This part of the documentation answers common questions about Requests.
|
||||
|
||||
Encoded Data?
|
||||
-------------
|
||||
|
||||
Requests automatically decompresses GZip'ed responses, and decodes
|
||||
response conten tinto unicode when encoding information is available.
|
||||
Requests automatically decompresses gzip-encoded responses, and does
|
||||
it's best to decodes response content to unicode when possible.
|
||||
|
||||
You can get direct access to the raw reasponse (and even the socket),
|
||||
if needed as well.
|
||||
|
||||
|
||||
Custom User-Agents?
|
||||
|
||||
+1
-6
@@ -442,7 +442,7 @@ class Response(object):
|
||||
def content(self):
|
||||
"""Content of the response, in bytes or unicode
|
||||
(if available)."""
|
||||
|
||||
|
||||
if self._content is not None:
|
||||
return self._content
|
||||
|
||||
@@ -463,11 +463,6 @@ class Response(object):
|
||||
return self._content
|
||||
|
||||
|
||||
@content.setter
|
||||
def content(self, value):
|
||||
self._content = value
|
||||
|
||||
|
||||
def raise_for_status(self):
|
||||
"""Raises stored :class:`HTTPError` or :class:`URLError`, if one occured."""
|
||||
if self.error:
|
||||
|
||||
Reference in New Issue
Block a user