Cannot set headers in procedures with fetch adapter
Am i right that with such a setup in nextjs app router route handler:
It is currently impossible to set headers inside a procedure, cause
fetchRequestHandler
just starts to stream proceddure response as body and resolves immedieately, not waiting for it to finish?
That's the behaviour that im observing right now:
1) setting header in procedure and logging
2) logging after await fetchRequestHandler()
3) first log is shown after the second one
And headers are not set cause body already started streaming i think3 Replies
If my assumptions are correct, what can i do about it?
I've tried implementing the adapter synchronously, without streaming using
resolveHTTPResponse
directly. But unfortunately getting JSON.parse()
errors on client (non-whitespace character after json at column X)@GamerZero did you find anything related to your issue?
Besides what I've already said here, no.