demo/body-parser/lib/types/text.js
function getCharset (req) {
  try {
    return contentType.parse(req).parameters.charset.toLowerCase()
  } catch (e) {
    return undefined
  }
}
function getCharset (req) {
  try {
    return contentType.parse(req).parameters.charset.toLowerCase()
  } catch (e) {
    return undefined
  }
}
function getCharset ( req ) { try { return contentType . parse ( req ) . parameters . charset . toLowerCase ( ) } catch ( e ) { return undefined } }
Get the charset of a request.

@param {object} req
@api private
Get the charset of a request .