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

Method __repr__

httpx/_models.py:366–379  ·  view source on GitHub ↗
(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 = ""
370 if self.encoding != "ascii":
371 encoding_str = f", 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 f"{class_name}({as_dict!r}{encoding_str})"
379 return f"{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