This is the same as accessing :attr:`stream` with the difference that if it finds cached data from calling :meth:`get_data` first it will create a new stream out of the cached data. .. versionadded:: 0.9.3
(self)
| 287 | d["stream"], d["form"], d["files"] = data |
| 288 | |
| 289 | def _get_stream_for_parsing(self) -> t.IO[bytes]: |
| 290 | """This is the same as accessing :attr:`stream` with the difference |
| 291 | that if it finds cached data from calling :meth:`get_data` first it |
| 292 | will create a new stream out of the cached data. |
| 293 | |
| 294 | .. versionadded:: 0.9.3 |
| 295 | """ |
| 296 | cached_data = getattr(self, "_cached_data", None) |
| 297 | if cached_data is not None: |
| 298 | return BytesIO(cached_data) |
| 299 | return self.stream |
| 300 | |
| 301 | def close(self) -> None: |
| 302 | """Closes associated resources of this request object. This |