function getHeader(elem, path, method, response, objEndpoint) {
    const origObjEndpoint = objEndpoint;
    try {
        for (let idx = 0; idx < response.length; ++idx) {
            let res = response[idx];

            elem = elem.split(new RegExp('application/xml', 'i'));
            elem = elem.join('application/xml');
            if (res && elem && elem.split(new RegExp(res + '\\s*\\t*\\n*\\.\\s*\\t*\\n*setHeader\\s*\\t*\\n*\\(')).length > 1) {
                elem = elem.split(new RegExp(res + '\\s*\\t*\\n*\\.\\s*\\t*\\n*setHeader\\s*\\('));
                if (elem.length > 1 && elem[1].toLocaleLowerCase().includes('content-type')) {
                    let content = elem[1].split(',')[1];
                    content = utils.popString(content);
                    objEndpoint[path][method].produces = [content];
                }
            }
        }
        if (swaggerTags.getOpenAPI() || (objEndpoint[path][method].produces && objEndpoint[path][method].produces.length == 0)) {
            objEndpoint[path][method].produces = undefined;
        }
        return objEndpoint;
    } catch (err) {
        return origObjEndpoint;
    }
}
Recognize content of .setHeader(...) method (ExpressJS).
@param {string} elem content.
@param {string} path endpoint's path.
@param {string} method
@param {array} response array containing variables of response.
@param {object} objEndpoint