if line:
print(json.loads(line))
+.. warning::
+
+ :class:`~requests.Response.iter_lines()` is not reentrant safe.
+ Calling this method multiple times causes some of the received data
+ being lost. In case you need to call it from multiple places, use
+ the resulting iterator object instead::
+
+ lines = r.iter_lines()
+ # Save the first line for later or just skip it
+ first_line = next(lines)
+ for line in lines:
+ print(line)
+
.. _proxies:
Proxies
"""Iterates over the response data, one line at a time. When
stream=True is set on the request, this avoids reading the
content at once into memory for large responses.
+
+ .. note:: This method is not reentrant safe.
"""
pending = None