Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing basic event listener on request - response #22836

Open
itsfuad opened this issue Mar 10, 2024 · 0 comments
Open

Missing basic event listener on request - response #22836

itsfuad opened this issue Mar 10, 2024 · 0 comments

Comments

@itsfuad
Copy link

itsfuad commented Mar 10, 2024

Nodejs has,

req.on("data", (data) => console.log(`on data: ${data.length}`));
req.on("close", () => console.log("req closed"));
req.on("aborted", () => console.log("req aborted"));
req.on("error", (err) => console.log("req error", err));

These events are very useful when server is doing a heavy task for the user. But it continues to do the work even the client is disconnected.

This is a serious issue in Deno. It doesn't have any way to know these things.

For response, node has,

res.on('end', () => console.log('Streaming is done'));

This way we know that the server has done the file or any kind of data streaming. Which is also missing in Deno.

It has a lot own methods. So why not implement those what developers need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant