iter_json

Closed #1015
This commit is contained in:
Kenneth Reitz
2012-12-17 02:42:34 -05:00
parent d5572ac13f
commit 7fc9378895
+5
View File
@@ -542,6 +542,11 @@ class Response(object):
except ValueError:
return None
def iter_json(self):
for line in self.iter_lines():
if line: # filter out keep-alive new lines
yield json.loads(line)
@property
def links(self):
"""Returns the parsed header links of the response, if any."""