diff --git a/httpx/_models.py b/httpx/_models.py index 2cc86321a4..f7e756171b 100644 --- a/httpx/_models.py +++ b/httpx/_models.py @@ -923,10 +923,10 @@ def iter_text(self, chunk_size: int | None = None) -> typing.Iterator[str]: for chunk in chunker.flush(): yield chunk - def iter_lines(self) -> typing.Iterator[str]: + def iter_lines(self, chunk_size: int | None = None) -> typing.Iterator[str]: decoder = LineDecoder() with request_context(request=self._request): - for text in self.iter_text(): + for text in self.iter_text(chunk_size=chunk_size): for line in decoder.decode(text): yield line for line in decoder.flush():