Handles the specified request.
@param Request $request the request to be handled
@return Response the resulting response
424130
public function handleRequest($request)
    {
        list ($route, $params) = $request->resolve();
        $this->requestedRoute = $route;
        $result = $this->runAction($route, $params);
        if ($result instanceof Response) {
            return $result;
        } else {
            $response = $this->getResponse();
            $response->exitStatus = $result;

            return $response;
        }
    }
587968
protected function handle(Request $request)
    {
        try {
            list($routeInformation, $parameters) = $this->findRoute($request);

            return (new Pipeline($this->container))
                ->through($routeInformation['middlewares'])
                ->send($request)
                ->then(function (Request $request) use ($routeInformation, $parameters) {
                    if ($routeInformation['action'] instanceof Closure) {
                        return call_user_func_array($routeInformation['action'], $parameters);
                    }

                    list($controller, $action) = $routeInformation['action'];
                    $controllerInstance = new $controller;

                    if ($controllerInstance instanceof KeeperBaseController) {
                        $controllerInstance->setContainer($this->container);
                        $controllerInstance->setRequest($request);
                    }

                    return call_user_func_array([$controllerInstance, $action], $parameters);
                });

        } catch (Throwable $exception) {
            if ($this->exceptionHandler) {
                return $this->exceptionHandler->handle($exception, $request);
            }

            return new Response((string)$exception, 500);
        }
    }
1279098
public function sendRequest(Request $request)
    {
        $response = $this->httpClient->send($request);

        $this->checkErrorResponse($response);

        return $response;
    }
431439
public function handle(Request $request)
	{
		if (!$this->app->runningInConsole())
		{
			$this->app['dispatcher']->trigger('system.onBeforeRoute');

			foreach ($this->app['router']->parse($request->getUri()) as $key => $val)
			{
				$request->setVar($key, $val, 'get');
			}

			$this->app['dispatcher']->trigger('system.onAfterRoute');

			if ($this->app->has('profiler'))
			{
				$this->app['profiler'] ? $this->app['profiler']->mark('afterRoute') : null;
			}
		}

		return $this->next($request);
	}
1194726
public function phpAction(Request $request)
    {
        $show = $request->query->get('show', -1);

        ob_start();
        phpinfo($show);
        $output = ob_get_clean();

        return new Response($output);
    }
520501
public function dispatch(Request $request)
    {
        $this->currentRequest = $request;
        
        if (is_null($response)) {
            $response = $this->dispatchToRoute($request);
        }
        
        return $this->prepareResponse($request, $response);
    }
1299111
public function run( Request $request )
	{
		try
		{
			if ( !is_string( $this->action['uses'] ) )
				return $this->runCallable( $request );

			return $this->runController( $request );
		}
		catch ( HttpResponseException $e )
		{
			return $e->getResponse();
		}
	}
1003931
public function send(Request $request)
    {
        foreach ($this->cookies as $cookie) {
            $request->addCookie($cookie);
        }

        $response = $this->client->request($request);

        if ($response->getCookies()) {
            $this->cookies = $response->getCookies();
        }

        return $response;
    }
883881
public function handle(Request $request)
    {
        if (!$this->booted) {
            $this->bootstrap();
        }

        $this->request = $request;
        $response = new Response();
        return($response);
    }
249953
private function handle(Request $request) : Response
    {
        $router = $this->getInstance(Router::class);

        if ($router->match($request->getPathInfo(), $request->getMethod())) { // A match has been found
            /** @var Route $match */
            $match = $router->getMatch();

            // Check if the handler is a closure or not
            $handler = $match->getHandler();

            if (is_object($handler) && $handler instanceof \Closure) {
                try {
                    $content = $this->resolveClosure($handler);
                } catch (\Exception $e) {
                    if (DEVELOPMENT) {
                        showPlainError('Something went wrong while resolving a closure, details below:', false);
                        pr($e);
                        exit;
                    }

                    return $this->respond(500);
                }
            } else {
                $controller = substr($handler, 0, stripos($handler, '.'));
                $method = substr($handler, (stripos($handler, '.') + 1));

                try {
                    $instance = $this->getInstance($controller);
                    if (method_exists($instance, 'setCrispySystem')) {
                        $instance->setCrispySystem($this);
                    }
                    $content = $this->resolveMethod($instance, $method, $match->getParameters());
                } catch (\Exception $e) {
                    if (DEVELOPMENT) {
                        showPlainError('Something went wrong while resolving a controller, details below:', false);
                        pr($e);
                        exit;
                    }

                    return $this->respond(500);
                }
            }

            return $this->respond(200, $content);
        }

        // No match found
        return $this->respond(404);
    }
352123
public function handle(Request $request)
	{
		$response = $this->next($request);

		if ($content = $response->original)
		{
			$content = $this->traverse($request, $content);

			$response->setContent($content);
		}

		return $response;
	}
1286806
public function handle(Request $request) : Response
	{
		if ($result = $this->handleContext($request, $this->rootContext)) {
			return $result;
		}
		
		if ($defaultHandler = $this->rootContext->getDefault()) {
			return $this->resultToResponse(
				call_user_func($defaultHandler, $request, null)
			);
		}
		
		throw new Exception('No matching route found. Set a default handler on root context to cover this case.');
	}
476334
private function handle(Request $request)
    {
        $kernel = $this->kernelFactory->create($this->environment);

        try {
            return $kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, false);
        } catch (HttpException $e) {
            if ($e->getPrevious()) {
                throw $e->getPrevious();
            }

            throw $e;
        }
    }
1229018
public function handle(Request $request)
    {
        try {
            $this->loadConfiguration();

            // Now that Configuration is loaded let's resolve controller
            // for given request.
            $calls = $this->resolveController($request);
            $controller = $calls['controller'];
            $callable   = $calls['callable'];

            // Resolve arguments before calling controller
            $res = $controller->$callable();

            // Check if controller returned Response
            // and if so let's use it as our response
            if (is_a($res, 'Symfony\Component\HttpFoundation\Response')) {
                $this->response = $res;
            }

        } catch (\Exception $e) {
            $error = new \StdClass;
            $error->message = $e->getMessage();
            $error->code    = $e->getCode();
            $this->response->setStatusCode($e->getCode());
            $this->response->setContent(json_encode($error));
            $this->response->headers->set('Content-Type', 'application/json');
        }

        // Send response
        if ($request->getRequestFormat() == 'json') {
            $this->response->headers->set('Content-Type', 'application/json');
        }

        $this->response->send();

    }
461891
public function postRequest( Request $request ) {
		$response = $this->getClient()->request(
			'POST',
			$this->apiUrl,
			$this->getClientRequestOptions( $request, $this->getPostRequestEncoding( $request ) )
		);

		return $this->decodeResponse( $response );
	}
882230
public function httpPost(Request $request) : Response
    {
        $response = new Response();
        $response->headers->set('Content-Type', 'application/json');

        $response->setContent(
            $this->sdkEndpoint->index(
                $request->getContent()
            )
        );

        return $response;
    }
291842
public function removeAction(Request $request): Response
    {
        $form = $this->formFactory->deleteTranslation();
        $form->handleRequest($request);

        /** @var ContentInfo $contentInfo */
        $contentInfo = $form->getData()->getContentInfo();

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (TranslationDeleteData $data) {
                $contentInfo = $data->getContentInfo();

                foreach ($data->getLanguageCodes() as $languageCode => $selected) {
                    $this->contentService->deleteTranslation($contentInfo, $languageCode);

                    $this->notificationHandler->success(
                        $this->translator->trans(
                            /** @Desc("Translation '%languageCode%' removed from content '%name%'.") */
                            'translation.remove.success',
                            ['%languageCode%' => $languageCode, '%name%' => $contentInfo->name],
                            'translation'
                        )
                    );
                }

                return new RedirectResponse($this->generateUrl('_ezpublishLocation', [
                    'locationId' => $contentInfo->mainLocationId,
                    '_fragment' => TranslationsTab::URI_FRAGMENT,
                ]));
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirect($this->generateUrl('_ezpublishLocation', [
            'locationId' => $contentInfo->mainLocationId,
            '_fragment' => TranslationsTab::URI_FRAGMENT,
        ]));
    }