From: Kenneth Reitz Date: Mon, 17 Dec 2012 11:35:10 +0000 (-0500) Subject: apparent_encoding X-Git-Tag: v1.0.0~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc34f33955d7f71c82da18d109f278470d083dab;p=services%2Fpython-requests.git apparent_encoding --- diff --git a/requests/models.py b/requests/models.py index 308abb3..92f2baf 100644 --- a/requests/models.py +++ b/requests/models.py @@ -418,6 +418,11 @@ class Response(object): return False return True + @property + def apparent_encoding(self): + """The apparent encoding, provided by the lovely Charade library.""" + return chardet.detect(self.content)['encoding'] + def iter_content(self, chunk_size=1, decode_unicode=False): """Iterates over the response data. This avoids reading the content at once into memory for large responses. The chunk size is the number