Get all the arguments from post request. Only get the first argument by default.
355546
def get_post_data(self):
        '''
        
        '''
        post_data = {}
        for key in self.request.arguments:
            post_data[key] = self.get_arguments(key)[0]
        return post_data
865726
protected function get_post_args() {
		if ( property_exists( $this, 'post_args' ) ) {
			return $this->post_args;
		}

		$timeout = EnvironmentOptions::Option('ilab-media-s3-batch-timeout', null, 0.1);
		return array(
			'timeout'   => $timeout,
			'blocking'  => false,
			'body'      => $this->data,
			'cookies'   => $_COOKIE,
			'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
		);
	}
156311
def _fetch_arguments(handler, method):
    """"""

    if method.__name__ == 'get':
        arguments = {}
        for key, value in six.iteritems(handler.request.arguments):
            # Tornado supports comma-separated lists of values in
            # parameters. We're undoing that here, and if a list
            # is expected the _validate method can handle it.
            if isinstance(value, list):
                arguments[key] = ','.join(value)
            else:
                arguments[key] = value
    else:  # post, put, patch, delete?
        arguments = handler.get_post_arguments()

    return arguments
1066220
def get_order_args():
    
    orders = {}
    for arg in request.args:
        re_match = re.findall("_oc_(.*)", arg)
        if re_match:
            order_direction = request.args.get("_od_" + re_match[0])
            if order_direction in ("asc", "desc"):
                orders[re_match[0]] = (request.args.get(arg), order_direction)
    return orders
993357
def fetch_post_data(self):
        '''
        
        '''
        post_data = {}
        ext_dic = {}
        for key in self.request.arguments:
            if key.startswith('def_'):
                ext_dic[key] = self.get_argument(key)
            else:
                post_data[key] = self.get_arguments(key)[0]

        post_data['user_name'] = self.userinfo.user_name

        ext_dic = dict(ext_dic, **self.ext_post_data(postdata=post_data))

        return (post_data, ext_dic)
1211647
protected function initParamsCompletePostData () {
		$result = [];
		$rawPhpInput = file_get_contents('php://input');
		$app = self::$app ?: (self::$app = & \MvcCore\Application::GetInstance());
		$toolClass = $app->GetToolClass();
		// try first JSON decoding, then fallback to query string
		$probablyAJsonType = !$toolClass::IsQueryString($rawPhpInput);
		if ($probablyAJsonType) {
			$decodedJsonResult = $toolClass::DecodeJson($rawPhpInput);
			if ($decodedJsonResult->success) {
				$result = (array) $decodedJsonResult->data;
			} else {
				$probablyAJsonType = FALSE; // fall back to query string parsing
			}
		}
		if (!$probablyAJsonType) {
			$rawPhpInput = trim($rawPhpInput, '&=');
			parse_str($rawPhpInput, $result);
		}
		return $result;
	}
805527
def get_dict_of_all_args(self):
        
        dictionary = {}
        for arg in [arg for arg in self.request.arguments if arg not in self.settings.get("reserved_query_string_params", [])]:
            val =  self.get_argument(arg, default=None)
            if val:
                dictionary[arg] = val
        return dictionary
1194816
def parse_arguments():
    """"""
    parser = create_parser()
    args = parser.parse_args()
    if not args.role_requirements_old_commit:
        args.role_requirements_old_commit = args.role_requirements
    if not args.rpc_product_old_commit:
        args.rpc_product_old_commit = args.rpc_product
    return args
356782
def get_request_kwargs(self):
        """"""
        kwargs = dict(stream=True, timeout=self.aggregate.config["timeout"])
        if self.proxy:
            kwargs["proxies"] = {self.proxytype: self.proxy}
        if self.scheme == u"https" and self.aggregate.config["sslverify"]:
            kwargs['verify'] = self.aggregate.config["sslverify"]
        else:
            kwargs['verify'] = False
        return kwargs
235559
def get(self, *args, **kwargs):
        ''''''
        # We'll go through all of our required args and make sure they're
        # present
        required = [arg for arg in self._args if arg not in kwargs]
        if len(args) < len(required):
            raise TypeError('Missing arguments %s' % required[len(args):])
        required = list(zip(required, args))
        args = args[len(required):]

        # Now we'll look through our defaults, if there are any
        defaulted = [(name, default) for name, default in self._defaults
            if name not in kwargs]
        overridden = list(zip([d[0] for d in defaulted], args))
        args = args[len(overridden):]
        defaulted = defaulted[len(overridden):]

        # And anything left over is in varargs
        if args and not self._varargs:
            raise TypeError('Too many arguments provided')

        return ArgTuple(required, overridden, defaulted, args, kwargs)
1071482
def all(self, endpoint, *args, **kwargs):
        
        # 1. Initialize the pagination parameters.
        kwargs.setdefault('params', {})['offset'] = 0
        kwargs.setdefault('params', {})['limit'] = self.limit
        kwargs['__method__'] = 'get'
        # 2. Create an initial paginated request.
        payload = self.request(endpoint, *args, **kwargs)
        has_next = payload.get('result', {}).setdefault(
            'meta', {'next': None}
        )['next']
        # 3. Loop until the end
        while has_next:
            # 4. Increment the offset
            kwargs['params']['offset'] += self.limit
            # 5. Query again
            _payload = self.request(endpoint, *args, **kwargs)
            # 6. Add the paginated data to the global one
            payload['result']['data'].extend(_payload['result']['data'])
            # 7. Compute has_next
            has_next = _payload['result']['meta']['next']
        del payload['result']['meta']
        return payload
40234
def fetch_post_data(self):
        '''
        
        '''
        post_data = {}
        ext_dic = {}
        for key in self.request.arguments:
            if key.startswith('ext_') or key.startswith('tag_'):
                ext_dic[key] = self.get_argument(key)
            else:
                post_data[key] = self.get_arguments(key)[0]

        post_data['user_name'] = self.userinfo.user_name
        post_data['kind'] = self.kind

        # append external infor.

        if 'tags' in post_data:
            ext_dic['def_tag_arr'] = [x.strip() for x
                                      in post_data['tags'].strip().strip(',').split(',')]
        ext_dic = dict(ext_dic, **self.ext_post_data(postdata=post_data))

        return (post_data, ext_dic)
506787
def get_arguments(self, name: str, strip: bool = True) -> List[str]:
        

        # Make sure `get_arguments` isn't accidentally being called with a
        # positional argument that's assumed to be a default (like in
        # `get_argument`.)
        assert isinstance(strip, bool)

        return self._get_arguments(name, self.request.arguments, strip)
620342
def arg_int(name, default=None):
    
    try:
        v = request.args.get(name)
        return int(v)
    except (ValueError, TypeError):
        return default
814064
def get_form_kwargs(self):
        
        kwargs = {"user": self.request.user, "initial": self.get_initial()}
        if self.request.method in ["POST", "PUT"]:
            kwargs.update({
                "data": self.request.POST,
                "files": self.request.FILES,
            })
        return kwargs
457820
def initialize_post(self):
        
        self.model = self.get_model()
        for key in self.model.keys():
            self.model.set(key, self.json_arguments.get(key))
351124
function getArgument(name, args) {
  var flags = args || process.argv.slice(2),
    index = flags.lastIndexOf(name);

  if (index === -1 || index + 1 >= flags.length) {
    return null;
  }

  return flags[index + 1];
}