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

Method _prepare

httpx/_models.py:571–576  ·  httpx/_models.py::Response._prepare
(self, default_headers: dict[str, str])

Source from the content-addressed store, hash-verified

569 self._num_bytes_downloaded = 0
570
571 def _prepare(self, default_headers: dict[str, str]) -> None:
572 for key, value in default_headers.items():
573 class="cm"># Ignore Transfer-Encoding if the Content-Length has been set explicitly.
574 if key.lower() == class="st">"transfer-encoding" and class="st">"content-length" in self.headers:
575 continue
576 self.headers.setdefault(key, value)
577
578 @property
579 def elapsed(self) -> datetime.timedelta:

Callers 1

__init__Method · 0.95

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected