Question · Vibe coding with Claude Code course · Module 7: LinkedIn clone
Quiz: cancel in the server stream
What is the cancel function for in the stream returned by GET in app/api/messages/[handle]/route.ts?
Answer options
- It closes the EventSource in the browser
- It removes the conversation's listener when the browser disconnects, so publish does not write to a closed stream
- It deletes the conversation's messages from data/messages.json
- It sends an empty line that ends the event
You can check the correct answer by solving this task in the CodeWorlds game.