Hampton Smith
Hampton Smith
Hey folks! A useful starting place might just be to provide some guidance on how we're meant to use `payloadAsStream`? My initial experimentation seems to show that inject() promises don't...
After a bit of fiddling, my confusion seems to arise because the Response is not returned until the first byte is written. I.e., consider: ```javascript import inject from 'light-my-request'; const...
> I have to check the codebase, but it confuses me that you await the inject. The stream is only returned when the promise resolves. You propose a test like...
But you're using `server.listen()` and `request()`, bypassing light-my-request injection: https://github.com/platformatic/mcp/blob/1e489fe96ba0d290de93059ea807f0f7b510cdab/test/last-event-id.test.ts#L184C49-L184C56 My example [here](https://github.com/fastify/light-my-request/issues/279#issuecomment-3146588130) doesn't use fastify or fastify-sse-v2.
Aha, yes. Those headers are sent [here in fastify-sse-v2](https://github.com/mpetrunic/fastify-sse-v2/blob/master/src/plugin.ts#L25-L27), but they are not sent until the first event is raised, which I agree is weird and likely non-compliant. I [filed...