Answers for "how to append response header in node in every request"

0

how to append response header in node in every request

// a middleware with no mount path; gets executed for every request to the app
app.use(function(req, res, next) {
  res.setHeader('charset', 'utf-8')
  next();
});
Posted by: Guest on October-22-2021
0

how to append response header in node

response.writeHead(200, {'Content-Type': 'application/json'});
Posted by: Guest on October-22-2021

Code answers related to "how to append response header in node in every request"

Code answers related to "Javascript"

Browse Popular Code Answers by Language