Return an iterator to yield chunks of chunk_size bytes from the raw stream.
(self, chunk_size=_DEFAULT_CHUNK_SIZE)
| 124 | yield pending.splitlines(keepends)[0] |
| 125 | |
| 126 | def iter_chunks(self, chunk_size=_DEFAULT_CHUNK_SIZE): |
| 127 | """Return an iterator to yield chunks of chunk_size bytes from the raw |
| 128 | stream. |
| 129 | """ |
| 130 | while True: |
| 131 | current_chunk = self.read(chunk_size) |
| 132 | if current_chunk == b"": |
| 133 | break |
| 134 | yield current_chunk |
| 135 | |
| 136 | def _verify_content_length(self): |
| 137 | # See: https://github.com/kennethreitz/requests/issues/1855 |