def iter_content(self, chunk_size=<NUM_LIT:1>, decode_unicode=False):
def generate():<EOL><INDENT>if hasattr(self.raw, '<STR_LIT>'):<EOL><INDENT>try:<EOL><INDENT>for chunk in self.raw.stream(chunk_size, decode_content=True):<EOL><INDENT>yield chunk<EOL><DEDENT><DEDENT>except ProtocolError as e:<EOL><INDENT>raise ChunkedEncodingError(e)<EOL><DEDENT>except DecodeError as e:<EOL><INDENT>raise ContentDecodingError(e)<EOL><DEDENT>except ReadTimeoutError as e:<EOL><INDENT>raise ConnectionError(e)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>while True:<EOL><INDENT>chunk = self.raw.read(chunk_size)<EOL>if not chunk:<EOL><INDENT>break<EOL><DEDENT>yield chunk<EOL><DEDENT><DEDENT>self._content_consumed = True<EOL><DEDENT>if self._content_consumed and isinstance(self._content, bool):<EOL><INDENT>raise StreamConsumedError()<EOL><DEDENT>elif chunk_size is not None and not isinstance(chunk_size, int):<EOL><INDENT>raise TypeError("<STR_LIT>" % type(chunk_size))<EOL><DEDENT>reused_chunks = iter_slices(self._content, chunk_size)<EOL>stream_chunks = generate()<EOL>chunks = reused_chunks if self._content_consumed else stream_chunks<EOL>if decode_unicode:<EOL><INDENT>chunks = stream_decode_response_unicode(chunks, self)<EOL><DEDENT>return chunks<EOL>
Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        chunk_size must be of type int or None. A value of None will
        function differently depending on the value of `stream`.
        stream=True will read data as it arrives in whatever size the
        chunks are received. If stream=False, data is returned as
        a single chunk.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.