index.js
function contentTypeHeader(type) {
    if (this._res.headersSent) return this.debug(
      'Headers already sent, ignoring content type change: %s', contentTypes[type]
    );

    this.contentType = contentTypes[type];
    this._res.setHeader('Content-Type', this.contentType);
  }
function contentTypeHeader(type) {
    if (this._res.headersSent) return this.debug(
      'Headers already sent, ignoring content type change: %s', contentTypes[type]
    );

    this.contentType = contentTypes[type];
    this._res.setHeader('Content-Type', this.contentType);
  }
function contentTypeHeader ( type ) { if ( this . _res . headersSent ) return this . debug ( 'Headers already sent, ignoring content type change: %s' , contentTypes [ type ] ) ; this . contentType = contentTypes [ type ] ; this . _res . setHeader ( 'Content-Type' , this . contentType ) ; }
Change the contentType header if possible.

@param {String} type html|json
@api private
Change the contentType header if possible .