MCPcopy
hub / github.com/pallets/werkzeug / _get_stream_for_parsing

Method _get_stream_for_parsing

src/werkzeug/wrappers/request.py:289–299  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 1

_load_form_dataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected