-
-
Notifications
You must be signed in to change notification settings - Fork 999
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
One HTTP/1.1 feature that we don't currently support is trailing headers.
Hardly a high priority since it's seems so rarely used, but it might be worth our while someday.
It'd be interesting to hear from folks who do have use-cases here.
One option at the Transport API layer might be to update the AsyncByteStream/SyncByteStream APIs in order to handle this, without affecting the majority of code that doesn't expect or care about trailing headers, for example...
def get_trailing_headers() -> List[Tuple[byte, byte]]:
# This method depends on the state of `__iter__`/`__aiter__`.
# Once the byte stream has been fully consumed, any trailing headers may be accessed via this method.
return []At the httpx level we could expose this information by mutating the response.headers once the stream has been iterated over.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request