data from $_REQUEST
8245
public function request($key, $type = 'string', $default = null)
    {
        $request = array_merge($this->get, $this->post, $this->cookie, $this->routeParams);
        $value = $default;
        if (isset($request[$key])) {
            $value = $request[$key];
        }
        settype($value, $type);
        return $value;
    }
1374378
protected function resolveRequestData($request): array
    {
        $params = $request->all();

        if ($request instanceof Request) {
            $routeParams = $request->route()->parameters();
            $params = array_merge($params, $routeParams);
        }

        return $params;
    }
604234
public function handleHttpRequest($request)
    {
        $this->parseRequestBase($request);

        $data = $this->parseRule();
        $path = $data[0] ?? $this->routeParams->path;
        if ($path) {
            $this->parsePath($path);
        }
        if (!empty($data[1])) {
            foreach ($data[1] as $name => $value) {
                $request->get[$name] = $value;
            }
        }
    }
656168
function parseQueryParams()
    {
        $request = $this->getMessageObject();

        $data = array();
        $url  = $request->getTarget();
        if ($p = parse_url($url, PHP_URL_QUERY))
            parse_str($p, $data);

        return $data;
    }
834019
public function index(string $request) : string
    {
        $jsonRpcCall = null;
        try {
            $jsonRpcCall = $this->getJsonRpcCall($request);

            $jsonRpcCallResponse = $this->getJsonRpcCallResponse($jsonRpcCall);

            return $this->getResponseString($jsonRpcCallResponse, $jsonRpcCall);
        } catch (\Exception $exception) {
            // Try to create a valid json-rpc error
            $jsonRpcCallResponse = (new JsonRpcCallResponse())->addResponse(
                $this->exceptionHandler->getJsonRpcResponseFromException($exception)
            );

            return $this->getResponseString($jsonRpcCallResponse, $jsonRpcCall);
        }
    }
402543
protected function getRequestData()
    {
        $this->requestMethod = $_SERVER['REQUEST_METHOD'];
        $arrFullUri = explode("?", $_SERVER['REQUEST_URI']);
        $this->requestPath = $arrFullUri[0];
        
        if (isset($arrFullUri[1])) {
            $this->requestParams = C::uriParams2Array($arrFullUri[1]);
        }
        
        $this->requestBody = $this->getRequestBody();
        
        /*echo "Method: ".print_r($this->requestMethod, true)."<br \>\n"
            . "Path: ".print_r($this->requestPath, true)."<br \>\n"
            . "Params: ".print_r($this->requestParams, true)."<br \>\n"
            . "Body: ".print_r($this->requestBody, true)."<br \>\n";*/
    }
232351
public function BasicParameters(&$Request) {
      $Request = array_merge($Request, array(
         'ServerHostname' => Url('/', TRUE),
         'ServerType' => Gdn::Request()->GetValue('SERVER_SOFTWARE'),
         'PHPVersion' => phpversion(),
         'VanillaVersion' => APPLICATION_VERSION
      ));
   }
370667
public function getDataParams()
    {
        $method = $_SERVER['REQUEST_METHOD'];

        switch ($method) {
            case "POST":
                $this->dataParameters = $this->getPostFromInput();
                break;

            case "PUT":
            case "DELETE":
                $this->dataParameters = $this->getPostFromInput();
                break;
        }
    }
271848
function query( $request, $content = '', $doSpeedCheck = 0 )
	{
		$this->error = $this->warn = array();
		$this->result_status_code = NULL;

		$is_ssl = FALSE;

		// is our request a http:// ... ?
		if (preg_match('!^http://!i',$request) || preg_match('!^https://!i',$request))
		{
			$location = parse_url($request);
			if (preg_match('!^https://!i',$request))
			{
				$this->connect('https://'.$location['host'],$location['port']);
			}
			else
				$this->connect('http://'.$location['host'],$location['port']);

			$this->set_login($location['user'],$location['pass']);

			$request = $location['path'];
			$content = $location['query'];

			if ( strlen($request) < 1 )
			{
				$request = '/';
			}

		}

		if (preg_match('!^ssl://!i', $this->remote_host))
			$this->remote_host = 'https://'.substr($this->remote_host, 6);

		if (preg_match('!^tcp://!i', $this->remote_host))
			$this->remote_host = 'http://'.substr($this->remote_host, 6);

		if (preg_match('!^https://!i', $this->remote_host))
			$is_ssl = TRUE;

		$array_headers = array(
			'Host' => ( $this->remote_port == 80 ? $this->remote_host : "$this->remote_host:$this->remote_port" ),
			'Accept' => '*/*',
			'Connection' => 'Close' );

		foreach ( $this->extra_headers as $key => $value )
		{
			$array_headers[$key] = $value;
		}

		$this->result = $this->result_header = $this->result_body = '';

		// was content sent as an array? if so, turn it into a string
		if (is_array($content))
		{
			$pairs = array();

			foreach ( $content as $key => $value )
			{
				$pairs[] = "$key=".urlencode($value);
			}

			$content = join('&',$pairs);
			unset($pairs);
		}

		$OK = TRUE;

		if ($this->method == 'GET')
			$request .= '?'.$content;

		$ch = curl_init($this->remote_host.':'.$this->remote_port.$request);

		if ($is_ssl)
		{
			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //1
			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //2
			//curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
		}

		curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
		curl_setopt($ch, CURLOPT_USERAGENT, "DirectAdmin/$this->version");
		curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
		curl_setopt($ch, CURLOPT_TIMEOUT, 10);
		curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
		curl_setopt($ch, CURLOPT_HEADER, 1);

		curl_setopt($ch, CURLOPT_LOW_SPEED_LIMIT, 51200);
		curl_setopt($ch, CURLOPT_LOW_SPEED_TIME, 5);

		//if ($this->doFollowLocationHeader)
		//{
		//	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
		//	curl_setopt($ch, CURLOPT_MAXREDIRS, $this->max_redirects);
		//}

		// instance connection
		if ($this->bind_host)
		{
			curl_setopt($ch, CURLOPT_INTERFACE, $this->bind_host);
		}

		// if we have a username and password, add the header
		if ( isset($this->remote_uname) && isset($this->remote_passwd) )
		{
			curl_setopt($ch, CURLOPT_USERPWD, $this->remote_uname.':'.$this->remote_passwd);
		}

		// for DA skins: if $this->remote_passwd is NULL, try to use the login key system
		if ( isset($this->remote_uname) && $this->remote_passwd == NULL )
		{
			$array_headers['Cookie'] = "session={$_SERVER['SESSION_ID']}; key={$_SERVER['SESSION_KEY']}";
		}

		// if method is POST, add content length & type headers
		if ( $this->method == 'POST' )
		{
			curl_setopt($ch, CURLOPT_POST, 1);
			curl_setopt($ch, CURLOPT_POSTFIELDS, $content);

			//$array_headers['Content-type'] = 'application/x-www-form-urlencoded';
			$array_headers['Content-length'] = strlen($content);
		}

		curl_setopt($ch, CURLOPT_HTTPHEADER, $array_headers);


		if( !($this->result = curl_exec($ch)) )
		{
			$this->error[] .= curl_error($ch);
			$OK = FALSE;
		}

		$header_size			= curl_getinfo($ch, CURLINFO_HEADER_SIZE);
		$this->result_header	= substr($this->result, 0, $header_size);
		$this->result_body		= substr($this->result, $header_size);
		$this->result_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

		$this->lastTransferSpeed = curl_getinfo($ch, CURLINFO_SPEED_DOWNLOAD) / 1024;

		curl_close($ch);

		$this->query_cache[] = $this->remote_host.':'.$this->remote_port.$request;

		$headers = $this->fetch_header();

		// did we get the full file?
		if ( !empty($headers['content-length']) && $headers['content-length'] != strlen($this->result_body) )
		{
			$this->result_status_code = 206;
		}

		// now, if we're being passed a location header, should we follow it?
		if ($this->doFollowLocationHeader)
		{
			//dont bother if we didn't even setup the script correctly
			if (isset($headers['x-use-https']) && $headers['x-use-https']=='yes')
				die($this->ssl_setting_message);

			if (isset($headers['location']))
			{
				if ($this->max_redirects <= 0)
					die("Too many redirects on: ".$headers['location']);

				$this->max_redirects--;
				$this->redirectURL = $headers['location'];
				$this->query($headers['location']);
			}
		}

	}
1373817
private function getParams(Request $request, array $data = []): array
    {
        // Add default request parameters
        $data = \array_filter($data) + [
                static::PARAM_QUERY => null,
                static::PARAM_VARIABLES => null,
                static::PARAM_OPERATION_NAME => null,
            ];

        // Keep a reference to the query-string
        $qs = $request->query;

        // Override request using query-string parameters
        $query = $qs->has(static::PARAM_QUERY) ? $qs->get(static::PARAM_QUERY) : $data[static::PARAM_QUERY];
        $variables = $qs->has(static::PARAM_VARIABLES) ? $qs->get(static::PARAM_VARIABLES) : $data[static::PARAM_VARIABLES];
        $operationName = $qs->has(static::PARAM_OPERATION_NAME) ? $qs->get(static::PARAM_OPERATION_NAME) : $data[static::PARAM_OPERATION_NAME];

        // `query` parameter is mandatory.
        if (empty($query)) {
            throw new BadRequestHttpException('Must provide query parameter');
        }

        // Variables can be defined using a JSON-encoded object.
        // If the parsing fails, an exception will be thrown.
        if (\is_string($variables)) {
            $variables = \json_decode($variables, true);

            if (\JSON_ERROR_NONE !== \json_last_error()) {
                throw new BadRequestHttpException('Variables are invalid JSON');
            }
        }

        return [
            static::PARAM_QUERY => $query,
            static::PARAM_VARIABLES => $variables,
            static::PARAM_OPERATION_NAME => $operationName,
        ];
    }
344031
protected function getRequestInformation() {
		$postdata = '';
			
		if ($_SERVER['REQUEST_METHOD'] == 'POST') {
			// build a request string
			$t = array();
			
			foreach ($_POST as $k => $v) {
				$t[] = $k . '=' . $v;
			}

			// make a one line string
			$postdata = preg_replace('![\n\r]!',"",implode('&',$t));
			
			// truncate if too long
			if (strlen($postdata) > 250) {
				$postdata = substr($postdata,0,250);
			}
		}

		// build a string with information about a request
		$requestinfo = ' '.getmypid() . "; " .
			basename($_SERVER['SCRIPT_FILENAME']) . "; " .
			$_SERVER['REMOTE_ADDR'] . "; " .
			$_SERVER['REQUEST_METHOD'] . "; " .
			$_SERVER['QUERY_STRING'] . "; " .
			$postdata . "; " .
			$_SERVER['HTTP_USER_AGENT'] . "; " .
			$_SERVER['HTTP_REFERER'];
		return $requestinfo;
	}
437701
public function getRequestData(): string
    {
        $requestData = $this->getData();

        $requestData = is_array($requestData) ? $this->httpBuildQuery($requestData) : (string)$requestData;

        return $requestData;
    }
1157285
protected function retrieveRequestData()
    {
        $this->cachedRequestData = GeneralUtility::_GP(\Tx_Phpunit_Interface_Request::PARAMETER_NAMESPACE);

        $this->requestDataHasBeenRetrieved = true;
    }
179189
protected function getData(Request $request)
    {
        $data = null;
        if ($request->query->has('dataId')) {
            $data = $this->get(DataRepository::class)->find($request->query->get('dataId'));
        }

        return $data;
    }
773638
public function getRequestData()
    {
        parent::getRequestData();

        if ($this->getRequest() instanceof Request) {
            if (in_array($this->getRequest()->getMethod(), array('PUT', 'DELETE'))) {
                $this->requestData[$this->getRequest()->getMethod()] = $this->getRequest()->request->all();
            }
        }

        return $this->requestData;
    }
500418
public function fromRequest(Request $request)
    {
        $pageName = $request->get('page');
        $language = $request->get('_locale');
        $permalink = $request->get('permalink');
        $options = array(
            "pageName" => $pageName,
            "languageName" => $language,
            "permalink" => $permalink,
            "pageId" => (int) $request->get('pageId'),
            "languageId" => (int) $request->get('languageId'),
        );

        $this->fromOptions($options);
    }
128619
def query_echo(cls, request,
                   foo: (Ptypes.query, String('A query parameter'))) -> [
            (200, 'Ok', String)]:
        ''''''
        log.info('Echoing query param, value is: {}'.format(foo))
        for i in range(randint(0, MAX_LOOP_DURATION)):
            yield
        msg = 'The value sent was: {}'.format(foo)
        Respond(200, msg)