code: def encoding(self):
          
          encoding = None
          ct = self.get_header('content-type')
          if ct:
              ah = AcceptHeader(ct)
              if ah.media_types:
                  encoding = ah.media_types[0][2].get("charset", None)
  
          return encoding
docs: the character encoding of the request, usually only set in POST type requests