Node.js - HTTP Module
What is wrong with this code snippet?
res.setHeader('Content-Type', 'text/html');
res.end('Hello');
res.setHeader('X-Test', '123');res.setHeader('Content-Type', 'text/html');
res.end('Hello');
res.setHeader('X-Test', '123');res.end() is called, the response is finished and headers cannot be modified.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions