Node.js / Express The res object in Express is a subclass of Node.js's http.ServerResponse (read the http.js source). You are allowed to call res.setHeader(name, value) as often as you want until you call res.writeHead(statusCode). After writeHead, the headers are baked in and you can only call res.write(data), and finally res.end(data). The error "Error: Can't set headers after they are sent." means that you're .. 더보기 이전 1 2 3 4 5 6 7 ··· 24 다음