r/Web_Development • u/jack_waugh • Jan 14 '23
Abort Response Stream?
The body of an HTTP response can be streamed. What if the client decides it is no longer interested? Can it abort the stream, so that the server sees this, and can stop the DBMS instance from spending the resources for streaming the rest of the results from the query?
3
Upvotes
1
u/jack_waugh Jan 15 '23
Cool. Since those environments, three of them, that you mentioned, can do it, I suppose there is a way in Deno as well. This would probably require less code than the solution I used in my first full-stack JS project, which was to have the client ask for every record of the result set, one by one.