parameters: (self)
docstring: Process the request entity based on its Content-Type.
docstring_summary: Process the request entity based on its Content-Type.
docstring_tokens: Process the request entity based on its Content - Type .
function: def process(self):
          """Process the request entity based on its Content-Type."""
          # "The presence of a message-body in a request is signaled by the
          # inclusion of a Content-Length or Transfer-Encoding header field in
          # the request's message-headers."
          # It is possible to send a POST request with no body, for example;
          # however, app developers are responsible in that case to set
          # cherrypy.request.process_body to False so this method isn't called.
          h = cherrypy.serving.request.headers
          if 'Content-Length' not in h and 'Transfer-Encoding' not in h:
              raise cherrypy.HTTPError(411)
  
          self.fp = SizedReader(self.fp, self.length,
                                self.maxbytes, bufsize=self.bufsize,
                                has_trailers='Trailer' in h)
          super(RequestBody, self).process()
  
          # Body params should also be a part of the request_params
          # add them in here.
          request_params = self.request_params
          for key, value in self.params.items():
              # Python 2 only: keyword arguments must be byte strings (type
              # 'str').
              if sys.version_info < (3, 0):
                  if isinstance(key, six.text_type):
                      key = key.encode('ISO-8859-1')
  
              if key in request_params:
                  if not isinstance(request_params[key], list):
                      request_params[key] = [request_params[key]]
                  request_params[key].append(value)
              else:
                  request_params[key] = value
function_tokens: def process ( self ) : # "The presence of a message-body in a request is signaled by the # inclusion of a Content-Length or Transfer-Encoding header field in # the request's message-headers." # It is possible to send a POST request with no body, for example; # however, app developers are responsible in that case to set # cherrypy.request.process_body to False so this method isn't called. h = cherrypy . serving . request . headers if 'Content-Length' not in h and 'Transfer-Encoding' not in h : raise cherrypy . HTTPError ( 411 ) self . fp = SizedReader ( self . fp , self . length , self . maxbytes , bufsize = self . bufsize , has_trailers = 'Trailer' in h ) super ( RequestBody , self ) . process ( ) # Body params should also be a part of the request_params # add them in here. request_params = self . request_params for key , value in self . params . items ( ) : # Python 2 only: keyword arguments must be byte strings (type # 'str'). if sys . version_info < ( 3 , 0 ) : if isinstance ( key , six . text_type ) : key = key . encode ( 'ISO-8859-1' ) if key in request_params : if not isinstance ( request_params [ key ] , list ) : request_params [ key ] = [ request_params [ key ] ] request_params [ key ] . append ( value ) else : request_params [ key ] = value