Node.js - HTTP ModuleWhich method is used to set the HTTP status code without sending the response immediately in Express?Ares.status()Bres.send()Cres.sendStatus()Dres.json()Check Answer
Step-by-Step SolutionSolution:Step 1: Identify methods that set status coderes.status() sets the status code but does not send the response immediately.Step 2: Compare with other methodsres.sendStatus() sets and sends; res.send() and res.json() send data but don't set status alone.Final Answer:res.status() -> Option AQuick Check:res.status() sets status without sending [OK]Quick Trick: Use res.status() to set code before sending response [OK]Common Mistakes:Using res.sendStatus() expecting no sendConfusing res.send() as status setterAssuming res.json() sets status code
Master "HTTP Module" in Node.js9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Node.js Quizzes Child Processes - fork for Node.js child processes - Quiz 2easy Cluster Module - Load balancing between workers - Quiz 4medium Debugging and Profiling - Console methods beyond log - Quiz 14medium Debugging and Profiling - Console methods beyond log - Quiz 13medium Debugging and Profiling - Node.js built-in debugger - Quiz 5medium Error Handling Patterns - Graceful shutdown on errors - Quiz 4medium HTTP Module - Serving static files - Quiz 7medium Timers and Scheduling - Event loop phases and timer execution - Quiz 2easy Timers and Scheduling - setInterval and clearInterval - Quiz 2easy URL and Query String Handling - Why URL parsing matters - Quiz 1easy