Process the request and return either a modified request or the original one

@param \Illuminate\Http\Request $request

@return \Illuminate\Http\Request
4055
public function processRequest(Request $request)
    {
        $contentType = $request->header('content-type') ?: '';

        if (mb_stripos($contentType, 'multipart/form-data') !== false) {
            $this->validateParsedBody($request);
            $request = $this->parseUploadedFiles($request);
        }

        return $request;
    }
1111377
public function process(Request $request) {
    // required
    $service = $this->getRegisteredService($request->getPart(1));
    
    $call = new Call(mb_strtolower($request->getMethod()));
    
    // identifier ist optional
    if (($identifier = $request->getPart(2)) !== NULL) {
      $call->addParameter($identifier);

      /* alle Subs weitergeben als weitere Parameter */
      foreach ($request->getPartsFrom(3) as $p) {
        $call->addParameter($p);
      }
    } else {
      $call->setName('index');
    }
    
    if ($request->getMethod() === Request::POST || $request->getMethod() === Request::PUT) {
      $call->addParameter($request->getBody());
    }
    
    $this->call = $call;
    $this->service = $service;
    return $this->call();
  }
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();
		}
	}
105820
public function indexAction(Request $request)
    {
        return $this->processView($action = 'index', $this->view($this->find($action, false)));
    }
211225
public function run(Request $request) {
    // process the requested action
    ObjectFactory::getInstance('actionMapper')->processAction($request, $this->response);
    return $this->response;
  }
428401
protected function prepareRequest(Request $request)
    {
        $curl = curl_init();
        
        // TODO Timeout and Follow Redirect settings
        $options = array(
            CURLOPT_RETURNTRANSFER    => true,
            CURLOPT_HEADER            => true,
            CURLOPT_CONNECTTIMEOUT_MS => 1000,
            CURLOPT_TIMEOUT_MS        => 3000,
            CURLOPT_CUSTOMREQUEST     => $request->getMethod(),
            CURLOPT_URL               => $request->getUri(),
            CURLOPT_HTTPHEADER        => $request->getHeaders(),
            CURLOPT_HTTPGET           => false,
            CURLOPT_NOBODY            => false,
            CURLOPT_POST              => false,
            CURLOPT_POSTFIELDS        => null,           
        );

        switch ($request->getMethod()) {
            case Request::METHOD_HEAD:
                $options[CURLOPT_NOBODY] = true;
                
                $query = http_build_query($request->getParameters());
                if (!empty($query)) {
                    $options[CURLOPT_URL] = $request->getUri().'?'.$query;
                }
                break;

            case Request::METHOD_GET:
                $options[CURLOPT_HTTPGET] = true;
                
                $query = http_build_query($request->getParameters());
                if (!empty($query)) {
                    $options[CURLOPT_URL] = $request->getUri().'?'.$query;
                }
                break;

            case Request::METHOD_POST:
            case Request::METHOD_PUT:
                $options[CURLOPT_POST] = true;
                $options[CURLOPT_POSTFIELDS] = http_build_query($request->getParameters());
                break;
        }
        
        curl_setopt_array($curl, $options);
        
        return $curl;
    }
1134705
public function handle(Request $request)
	{
		$response = $this->next($request);

		// If CLI then we have to gather all query, post and header values
		// into params for Oauth_Provider's constructor.
		$params = array();

		if ($this->app->runningInConsole())
		{
			$queryvars = $this->app['request']->get('queryvars');
			$postvars  = $this->app['request']->get('postdata');

			if (!empty($queryvars))
			{
				foreach ($queryvars as $key => $value)
				{
					if (isset($queryvars[$key]))
					{
						$params[$key] = $queryvars[$key];
					}
					else if (isset($postvars[$key]))
					{
						$params[$key] = $postvars[$key];
					}
				}
			}

			if (!empty($postvars))
			{
				foreach ($postvars as $key => $value)
				{
					if (isset($queryvars[$key]))
					{
						$params[$key] = $queryvars[$key];
					}
					else if (isset($postvars[$key]))
					{
						$params[$key] = $postvars[$key];
					}
				}
			}

			if (empty($params))
			{
				return false;
			}
		}

		$this->app['authn'] = $this->app['auth']->authenticate($params);

		$this->app['request']->setVar('validApiKey', !empty($this->app['authn']['consumer_key']));

		return $response;
	}
1186960
protected function processPageParams(Request $request)
    {
        if ($request->has('page') && is_numeric($request->get('page'))) {
            $this->page = $request->get('page');
        }
        if ($request->has('per_page') && is_numeric($request->get('per_page'))) {
            $this->perPage = $request->get('per_page');
        }
    }
600488
public function toCmsRequest(Request $request)
    {

        $cmsRequest = (new CmsRequest)->duplicate(

            $request->query->all(), $request->request->all(), $request->attributes->all(),

            $request->cookies->all(), $request->files->all(), $request->server->all()
        );

        $cmsRequest->headers = clone $request->headers;

        return $cmsRequest;

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

        $this->request = $request;
        $response = new Response();
        return($response);
    }
1298909
protected function doRequestInProcess($request)
    {
        $response = parent::doRequestInProcess($request);

        $this->profiler = false;

        return $response;
    }
1118726
public function editAction(Request $request)
    {
        $block = $this->findBlockByRequest($request);

        try {
            $response = $this->getEditor()->getBlockManager()->update($block, $request);
        } catch (EditorExceptionInterface $e) {
            return $this->handleException($e);
        }

        if ($response instanceof Modal) {
            return $this->renderModal($response);
        } elseif ($response instanceof Response) {
            return $response;
        }

        $this->validate($block);
        $this->persist($block);

        $view = $this->getViewBuilder()->buildBlock($block);

        if (0 < strlen($block->getName())) {
            $data = ['widgets' => $view->widgets];
        } else {
            $data = ['blocks' => [$view]];
        }

        return $this->buildResponse($data, self::SERIALIZE_CONTENT);
    }
285870
public function dispatch(Request $request)
    {
        $this->authorize($request);

        return $this->next->dispatch($request);
    }
804741
public function process($request)
    {
        $templateName = $this->configData->getRequired('template');
        
        $body = $this->template->render(
            $templateName,
            array(
                'request' => $request
            )
        );
        
        return $this->http->responses()->response($body, array(), 404);
    }
347723
public function allAction(Request $request)
    {
        $model = $this->getModel();

        $content = $this->restUtils->serialize($model->findAll($request));

        $response = $this->getResponse()
            ->setStatusCode(Response::HTTP_OK)
            ->setContent($content);

        return $response;
    }
311684
public function processRequest(RequestInterface $request)
    {
        $this->response = $this->communicator->getResponse($request);

        return $this->response;
    }
18862
public function update(Request $request)
    {
        // AUTHORIZE ... COMES HERE
        $pageblock = $this->pageblock->getById($request->get('pageblock_id'));
        $pageblock = $this->pageBlockRepository->updateBody($pageblock, $request->get('html'));
        return $pageblock;
    }