What is the difference between res.setHeader and res.header. Which one should be used for enabling CORS? In some pages res.header is used and some pages res.setHeader is use
// single field is set
res.setHeader('content-type', 'application/json');
// multiple files can be set
res.set({
'content-type': 'application/json',
'content-length': '100',
'warning': "with content type charset encoding will be added by default"
});