Streaming in Next.js (Pages) API routes not working #67026
-
SummaryUpdate: Vercel confirmed that the docs were wrong and streaming is not supported in the Next.js pages. I have a Next.js (pages) API route (Node.js handler) and want to stream some data but streaming doesn't work. According to https://vercel.com/docs/functions/streaming#streaming-functions it should just work. I am setting the route config Additional informationOn Vercel the API route buffers the response and flushes only at the end when the connection is closed with ExampleSource: https://gist.github.com/giuseppeg/ae8150a53c5caea8b88f8283ea63b6d3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The streaming works only with the App Router. |
Beta Was this translation helpful? Give feedback.
The streaming works only with the App Router.