code: def get_charset(self, default: str) -> str:
          
          ctype = self.headers.get(CONTENT_TYPE, '')
          mimetype = parse_mimetype(ctype)
          return mimetype.parameters.get('charset', default)
docs: Returns charset parameter from Content-Type header or default.