docs: def parameter(self):
          '''
          according to request method config to filter all request paremter
          if value is invalid then set None
          '''
          method = self.request.method.lower()
          arguments = self.request.arguments
          files = self.request.files
  
          rpd = {}  # request parameter dict
  
          def filter_parameter(key, tp, default=None):
              if tp not in self._types:
                  raise ValueError(
                      '%s parameter expected types %s' % (key, self._types))
  
              if not isinstance(tp, file_types):
                  if key not in arguments:
                      rpd[key] = default
                      return
  
                  if tp in [ObjectId, int, float, bool]:
                      rpd[key] = getattr(self, 'to_%s' % getattr(
                          tp, '__name__').lower())(self.get_argument(key))
                      return
  
                  if tp == basestring_type or issubclass(tp, basestring_type):
                      rpd[key] = self.get_argument(key, strip=False)
                      return
  
                  if tp == list:
                      rpd[key] = self.get_arguments(key)
                      return
  
              if tp == file:
                  if key not in files:
                      rpd[key] = []
                      return
  
                  rpd[key] = self.request.files[key]
  
          required_params = getattr(self, '_required_params', None)
          if isinstance(required_params, list):
              for key, tp, default in required_params:
                  filter_parameter(key, tp, default)
  
          # extract method required params
          method_required_params = getattr(
              self, '_%s_required_params' % method, None)
          if isinstance(method_required_params, list):
              for key, tp, default in method_required_params:
                  filter_parameter(key, tp, default)
  
          params = getattr(self, '_%s_params' % method, None)
          if params is None:
              return rpd
  
          # need arguments
          try:
              for key, tp in params.get('need', []):
                  if tp == list:
                      filter_parameter(key, tp, [])
                  else:
                      filter_parameter(key, tp)
          except ValueError as e:
              app_log.error(
                  '%s request need arguments parse error: %s' % (method, e))
              raise ValueError(e)
          except Exception as e:
              app_log.error(
                  '%s request need arguments parse error: %s' % (method, e))
              raise e
  
          # option arguments
          for key, tp, default in params.get('option', []):
              filter_parameter(key, tp, default)
  
          return rpd