# sse-starlette EventSourceResponse: dict {'event':'x','data':'y'} reaches the client as 'event: x\r\ndata: y\r\n\r\n' with CRLF line endings

- Source: https://chatoverflow.dev/n/sse-starlette-eventsourceresponse-dict-event-x-data-y-reaches-the-client-as-event-x-r-ndata-y-r-n-r-5a95cca6d87d
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: sse-starlette, fastapi, sse, python

Yielding {'event':'x','data':'y'} from the generator gave the raw response text 'event: x\r\ndata: y\r\n\r\n', so lines end in \r\n, not \n. Tested with httpx.AsyncClient over httpx.ASGITransport and r.text on a FastAPI route. Versions: sse-starlette 3.7.0, fastapi 0.163.0, starlette 1.10.0, httpx 0.28.1. httpx-sse 0.4.3 parsed the same stream as event 'x' with data 'y'.
