Set request.

@param JsonRequest|null $request
@return $this
435271
public function setRequest(JsonRequest $request)
    {
        $this->id = $request->getId();
        $this->jsonrpc = $request->getJsonrpc();
        $this->method = $request->getMethod();
        $this->request = $request;

        if (!$request->getResponse()) {
            $request->setResponse($this);
        }

        return $this;
    }
1175036
protected function setDataFromRequest(RequestInterface $request)
    {
        $keys = $this->validDataFromRequest();
        $data = $request->getParams($keys);
        $this->mergeData($data);

        return $this;
    }
316000
public static function Request($NewRequest = NULL) {
      $Request = self::$_Request; //self::Factory(self::AliasRequest);
      if (!is_null($NewRequest)) {
			if (is_string($NewRequest))
				$Request->WithURI($NewRequest);
			elseif (is_object($NewRequest))
				$Request->FromImport($NewRequest);
		}
      
      return $Request;
   }
263027
public function updateValueAction(Request $request)
    {
        $name = $request->get('name');
        $value = $request->get('value');

        $manager = $this->get('ongr_settings.settings_manager');
        $manager->update($name, ['value' => $value]);

        return new JsonResponse(['error' => false]);
    }
571186
public function set(&$request, &$response = null)
    {
        $this->request  = $request;
        $this->response = $response;
        return $this;
    }
134841
public function execute( Request $request )
    {
        $controllerClass = $request->attributes->get('_controller');
        if( !($this->isJwtRequired($controllerClass))) {
            return null;
        }

        if( !$this->authoriser->isAuthorised( $request ) ) {
            return new JsonResponse( ['error' => 'Invalid token'], 403 );
        }
        return null;
    }
758124
private function _setRequest()
	{
		if ($this->_requestUri !== NULL) {
            $this->_request = preg_replace('#(^/)|(^' . ROOT . ')|(/$)#', '', $this->_requestUri);

            if (! $this->_request) {
            	$this->_request = self::DEFAULT_MODULE . '/' . self::DEFAULT_VIEW;
            }

            $this->_requestVars = explode('/', $this->_request);
            if (count($this->_requestVars) == 1) {
				$this->_request       .= '/' . self::DEFAULT_VIEW;
				$this->_requestVars[]  = self::DEFAULT_VIEW;
            }

            return $this;
        }

        throw new Exception('Request URI is not available');
	}
306862
public function add($request)
    {
        if (is_array($request)) {
            array_walk($request, [$this, __METHOD__]);

            return $this;
        }

        if (!$request instanceof Request) {
            throw new InvalidArgumentException('Argument for add() must be of type array or Request.');
        }

        $this->requests[] = $request;

        return $this;
    }
240352
public function setRequest(Request $request = null)
    {
        $this->request = $request;
        // try to set User-Agent from original request
        if ($request && $this->browser) {
            $this->browser->setDefaultHeaders([
                'User-Agent' => $request->server->get('HTTP_USER_AGENT', self::DEFAULT_USER_AGENT),
            ]);
        }
    }
687762
public function run($request = null)
    {
        $response = $this->dispatch($request);

        if ($response instanceof SymfonyResponse) {
            $response->send();
        } else {
            echo (string) $response;
        }

        if (count($this->middleware) > 0) {
            $this->callTerminableMiddleware($response);
        }
    }
1283086
public function run(Request $request = null)
    {
        if (null === $request) {
            $request = Request::createFromGlobals();
        }

        $this->registerMiddleware('Phprest\Middleware\ApiVersion');

        $app = $this->stackBuilder->resolve($this);

        $response = $app->handle($request, self::MASTER_REQUEST, false);
        $response->send();

        $app->terminate($request, $response);
    }
55461
public function dispatch(ServerRequest $request = null)
    {
        $response = $this->respond($request ? : $this->request);

        $response->send();
    }
1322304
public function bindRequest(Request $request)
    {
        $this->request = $request;

        foreach ($this->request->postArray() as $key => $value) {
            if (isset($this->fieldSet[$key])) {
                $this->fieldSet[$key]->setValue($value);
            }
        }
    }
974126
public function addBatchRequest(ClientRequestInterface $request)
    {
        if ($request instanceof ContextAwareInterface) {
            $request->setContextIfNull($this->getConfig()->getContext());
        }
        $this->batchRequests[] = $request;
        return $this;
    }
1071041
public function setRequest(RequestDescription $request)
    {
        $this->request = $request;
        $this->stack->setRequest($request);
    }
830939
public function setRequest(Request $request)
    {
        // reset the current state
        $this->reset();

        // retrieve a new session from the app
        $this->session = $this->app->make('session');

        return parent::setRequest($request);
    }
1320327
public function setRequest(\OxidEsales\PayPalModule\Model\PayPalRequest\PayPalRequest $request)
    {
        $this->setParameters($request->getData());
    }