@return Request

@throws \InvalidArgumentException
552579
protected function buildRequest()
    {
        $request = new Request($this->helper());
        $request->setRouter($this->router());

        return $request;
    }
753179
public static function request()
    {
        $container = Container::instance();
        if (!$container->has('request')) {
            $request = new Request(Kernel::options('strict'));
            $container->register('request', $request->fromServer());
        }
        return $container->get('request');
    }
749990
public function getRequest(){
        if($this->httpCore != NULL){
            return $this->httpCore->httpRequest;
        }else{
            return $this->cronCore->cronRequest;
        }
    }
688000
public static function getRequest()
    {
        if (self::$request) {
            return self::$request;
        }
        // Fall back to trying from the global state
        if (Controller::has_curr()) {
            return Controller::curr()->getRequest();
        }
    }
159832
public function httpRequest()
    {
        if ($this->httpRequest === null) {
            throw new RuntimeException(sprintf(
                'PSR-7 HTTP Request is not defined for "%s"',
                get_class($this)
            ));
        }

        return $this->httpRequest;
    }
722655
protected function createDefaultRequest()
    {
        $request = Request::createFromGlobals();
        $session = new Session();

        $request->setSession($session);

        return $request;
    }
930431
protected function prepareRequest()
    {
        $request = Request::capture();
        $request->setSession($this->app['session']);
        //$request->enableHttpMethodParameterOverride();

        $this->app->singleton('Nano7\Http\Request');
        $this->app->alias('request', 'Nano7\Http\Request');
        $this->app->instance('request', $request);

        return $request;
    }
820448
public function getRequest()
  {
    if ($this->request === null) {
      // @codeCoverageIgnoreStart
      $this->request = Request::buildFromGlobals();
    }
    // @codeCoverageIgnoreEnd

    return $this->request;
  }
276901
public function createRequest() {
        $request = new \Amp\Artax\Request();
        $url = null;
        $request->setMethod('GET');

        $queryParameters = [];

        if (array_key_exists('Accept', $this->parameters) == true) {
        $value = $this->getFilteredParameter('Accept');
            $request->setHeader('Accept', $value);
        }
        $value = $this->getFilteredParameter('Authorization');
        if ($value != null) {
            $request->setHeader('Authorization', $value);
        }
        $value = $this->getFilteredParameter('userAgent');
        $request->setHeader('User-Agent', $value);
        if (array_key_exists('perPage', $this->parameters) == true) {
        $value = $this->getFilteredParameter('perPage');
            $queryParameters['per_page'] = $value;
        }
        if (array_key_exists('otp', $this->parameters) == true) {
        $value = $this->getFilteredParameter('otp');
            $request->setHeader('X-GitHub-OTP', $value);
        }
        $value = $this->getFilteredParameter('pageURL');
        $url = $value;

        //Parameters are parsed and set, lets prepare the request
        if ($url == null) {
            $url = "https://api.github.com";
        }
        if (count($queryParameters)) {
            $url = $url.'?'.http_build_query($queryParameters, '', '&', PHP_QUERY_RFC3986);
        }
        $request->setUri($url);

        return $request;
    }
1289152
public function make($data)
    {
        if (is_object($data) && $data instanceof Request) {
            return new RequestTransformer();
        }

        if (is_array($data)) {
            return new ArrayTransformer();
        }

        throw new InvalidArgumentException('An array, or an instance of Illuminate\Http\Request was expected.');
    }
865754
private function get(ServerRequestInterface $request)
    {
        $middleware = current($this->middleware);
        next($this->middleware);

        if ($middleware === false) {
            return $middleware;
        }

        if (is_array($middleware)) {
            $conditions = $middleware;
            $middleware = array_pop($conditions);

            foreach ($conditions as $condition) {
                if ($condition === true) {
                    continue;
                }

                if ($condition === false) {
                    return $this->get($request);
                }

                if (is_string($condition)) {
                    $condition = new Matchers\Path($condition);
                } elseif (!is_callable($condition)) {
                    throw new InvalidArgumentException('Invalid matcher. Must be a boolean, string or a callable');
                }

                if (!$condition($request)) {
                    return $this->get($request);
                }
            }
        }

        if (is_string($middleware)) {
            if ($this->container === null) {
                throw new InvalidArgumentException(sprintf('No valid middleware provided (%s)', $middleware));
            }

            $middleware = $this->container->get($middleware);
        }

        if ($middleware instanceof Closure) {
            return self::createMiddlewareFromClosure($middleware);
        }

        if ($middleware instanceof MiddlewareInterface) {
            return $middleware;
        }

        throw new InvalidArgumentException(sprintf('No valid middleware provided (%s)', is_object($middleware) ? get_class($middleware) : gettype($middleware)));
    }
101110
private function getRequest() {

        $token = $this->getParam('token');

        if (empty($token)) {
            throw new ConfigurationException(__CLASS__ . ' is not configured properly. Please set "token" parameter properly.');
        }

        $request = new Request();
        $request->setUri($this->url);
        $request->setMethod(Request::METHOD_POST);

        $request->getHeaders()->addHeaders(array(
          'accept' => 'application/json',
          'content-type' => 'application/json',
          'authorization' => 'Basic ' . $token
        ));

        return $request;
    }
996689
public function RouteRequest () {
		$router = $this->GetRouter()->SetRequest($this->GetRequest());
		try {
			/**
			 * `Route()` method could throws those exceptions:
			 * @throws \LogicException Route configuration property is missing.
			 * @throws \InvalidArgumentException Wrong route pattern format.
			 */
			$result = $router->Route();
		} catch (\Exception $e) {
			$this->DispatchException($e);
			$result = FALSE;
		}
		return $result;
	}
591820
public function getHttp()
    {
        if (!$this->http) {
            $this->http = new Http();
            $this->http->setRequest($this);
        }

        return $this->http;
    }
1233846
public function getRequest()
    {
        if (null == $this->request) {
            $this->setRequest(Application::container()->get('request'));
        }
        return $this->request;
    }
484553
public function getRequest()
    {
        if (null === $this->request) {
            $this->setRequest($this->getController()->getRequest());
        }

        return $this->request;
    }
598761
public function request()
    {
        $this->getTransactions();
        if (! is_null($this->_PagSeguroPaymentList->getTransactions())) {
            $partiallyRefundedOrdersArray = $this->getPartiallyRefundedOrders();

            foreach ($this->_PagSeguroPaymentList->getTransactions() as $payment) {
                $order = $this->decryptOrderById($payment);

                if (!in_array($order->getId(), $partiallyRefundedOrdersArray)) {
                    if (! $this->addPayment($this->decryptOrderById($payment), $payment))
                        continue;
                }
            }
        }
        return $this->_arrayPayments;
    }