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

Method get_headers

httpx/_multipart.py:287–292  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

285 # Content stream interface.
286
287 def get_headers(self) -> dict[str, str]:
288 content_length = self.get_content_length()
289 content_type = self.content_type
290 if content_length is None:
291 return {"Transfer-Encoding": "chunked", "Content-Type": content_type}
292 return {"Content-Length": str(content_length), "Content-Type": content_type}
293
294 def __iter__(self) -> typing.Iterator[bytes]:
295 for chunk in self.iter_chunks():

Callers 1

encode_multipart_dataFunction · 0.95

Calls 1

get_content_lengthMethod · 0.95

Tested by

no test coverage detected