Example for streaming response with the null character as delimiter #1382
-
How to handle a streaming response with the null character as delimiter? Server example: yield (json.dumps(data) + '\0').encode('utf-8')
for chunk in response.iter_lines(
chunk_size=8192,
decode_unicode=False,
delimiter=b'\0'
):
if chunk:
data = json.loads(chunk.decode('utf-8')) |
Beta Was this translation helpful? Give feedback.
Answered by
ehsandeep
Sep 30, 2023
Replies: 1 comment 1 reply
-
@danilopeixoto please post it to https://github.com/encode/httpx/discussions |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
MetzinAround
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@danilopeixoto please post it to https://github.com/encode/httpx/discussions