MCPcopy
hub / github.com/encode/httpx / iter_lines

Method iter_lines

httpx/_models.py:926–933  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

924 yield chunk
925
926 def iter_lines(self) -> typing.Iterator[str]:
927 decoder = LineDecoder()
928 with request_context(request=self._request):
929 for text in self.iter_text():
930 for line in decoder.decode(text):
931 yield line
932 for line in decoder.flush():
933 yield line
934
935 def iter_raw(self, chunk_size: int | None = None) -> typing.Iterator[bytes]:
936 """

Callers 4

test_line_decoder_nlFunction · 0.95
test_line_decoder_crFunction · 0.95
test_line_decoder_crnlFunction · 0.95
test_iter_linesFunction · 0.95

Calls 5

iter_textMethod · 0.95
decodeMethod · 0.95
flushMethod · 0.95
LineDecoderClass · 0.85
request_contextFunction · 0.85

Tested by 4

test_line_decoder_nlFunction · 0.76
test_line_decoder_crFunction · 0.76
test_line_decoder_crnlFunction · 0.76
test_iter_linesFunction · 0.76