MCPcopy
hub / github.com/scrapy/scrapy / _set_body

Method _set_body

scrapy/http/request/__init__.py:272–273  ·  view source on GitHub ↗
(self, body: str | bytes | None)

Source from the content-addressed store, hash-verified

270 return self._body
271
272 def _set_body(self, body: str | bytes | None) -> None:
273 self._body = b"" if not body else to_bytes(body, self.encoding)
274
275 @property
276 def encoding(self) -> str:

Callers 2

__init__Method · 0.95
__init__Method · 0.45

Calls 1

to_bytesFunction · 0.90

Tested by

no test coverage detected