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

Method __repr__

httpx/_models.py:366–379  ·  httpx/_models.py::Headers.__repr__
(self)

Source from the content-addressed store, hash-verified

364 return sorted(self_list) == sorted(other_list)
365
366 def __repr__(self) -> str:
367 class_name = self.__class__.__name__
368
369 encoding_str = class="st">""
370 if self.encoding != class="st">"ascii":
371 encoding_str = fclass="st">", encoding={self.encoding!r}"
372
373 as_list = list(_obfuscate_sensitive_headers(self.multi_items()))
374 as_dict = dict(as_list)
375
376 no_duplicate_keys = len(as_dict) == len(as_list)
377 if no_duplicate_keys:
378 return fclass="st">"{class_name}({as_dict!r}{encoding_str})"
379 return fclass="st">"{class_name}({as_list!r}{encoding_str})"
380
381
382class Request:

Callers

nothing calls this directly

Calls 2

multi_itemsMethod · 0.95

Tested by

no test coverage detected