@param Request $request

@return Response
6407
public function cgetAction(Request $request)
    {
        $list = new CollectionRepresentation(
            $this->getManager()->findAll($this->getLocale($request)),
            self::$entityKey
        );

        $view = $this->view($list);

        return $this->handleView($view);
    }
320816
protected function processPost(Request $request)
    {
        $resource = $this->getResourceManager()->createNewInstance();
        return $this->processAction($request, 'POST', $resource);
    }
1192515
public function addAction(Request $request): Response
    {
        $form = $this->formFactory->addCustomUrl();
        $form->handleRequest($request);

        /** @var CustomUrlAddData $data */
        $data = $form->getData();
        $location = $data->getLocation();

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (CustomUrlAddData $data) {
                $this->urlAliasService->createUrlAlias(
                    $data->getLocation(),
                    $data->getPath(),
                    $data->getLanguage()->languageCode,
                    $data->isRedirect()
                );

                return $this->redirectToLocation($data->getLocation(), UrlsTab::URI_FRAGMENT);
            });

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

        if ($location) {
            return $this->redirectToLocation($location, UrlsTab::URI_FRAGMENT);
        }

        return $this->redirectToRoute('ezplatform.dashboard');
    }
126546
public function readAction(Request $request)
    {
        $response = $this->convertResourceToPlainText(
            $request->getRequestFormat('xml'),
            $this->mapper->getResource($request->get('id'))
        );

        return new Response($response);
    }
449683
public function refreshAction(Request $request) {
        try {
            $refreshCode = $this->getRefreshCode($request);

            $clientSecret = $this->getClientSecret($request);
            $credentials = $this->accessProvider->refresh($request, $refreshCode, $clientSecret);

            $response = new JsonResponse([
                'access_code' => $credentials->getAccessCode(),
                'refresh_code' => $credentials->getRefreshCode(),
                'lifetime' => $credentials->getLifetime()
            ]);
        } catch (SoauthException $e) {
            $data = [];

            if($e instanceof BadDataException) {
                $data['errors'] = $e->getErrors();
            }

            $response = new JsonResponse($data, Response::HTTP_BAD_REQUEST);
        }

        $this->info('< Response', ['status_code' => $response->getStatusCode()]);

        return $response;
    }
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;
    }
309450
public function store(Request $request)
    {
        $response = $this->repository->create($request->all());
        return Response::apiResponse([
            'data' => $response
        ]);
    }
968561
public function addAction(Request $request): Response
    {
        $form = $this->formFactory->addTranslation();
        $form->handleRequest($request);

        /** @var TranslationAddData $data */
        $data = $form->getData();
        $location = $data->getLocation();

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (TranslationAddData $data) {
                $location = $data->getLocation();
                $contentInfo = $location->getContentInfo();
                $language = $data->getLanguage();
                $baseLanguage = $data->getBaseLanguage();

                return new RedirectResponse($this->generateUrl('ezplatform.content.translate', [
                    'contentId' => $contentInfo->id,
                    'fromLanguageCode' => null !== $baseLanguage ? $baseLanguage->languageCode : null,
                    'toLanguageCode' => $language->languageCode,
                ]));
            });

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

        $redirectionUrl = null !== $location
            ? $this->generateUrl('_ezpublishLocation', ['locationId' => $location->id])
            : $this->generateUrl('ezplatform.dashboard');

        return $this->redirect($redirectionUrl);
    }
960992
public function handle(Request $request)
    {
        $this->currentUri = $request->fullUrl();

        $this->response = $this->app->prepareResponse($this->app->handle($request));

        return $this;
    }
439934
protected function sendRequest(Request $request): Response
    {
        // Set password authentication for request.
        if ($this->password !== null) {
            $request->authenticate($this->password);
        }

        $this->send((string) $request);
        $response = new Response($this->get());
        return $response;

    }
1044107
public function send(Request $request)
    {
        $response     = new GetIndexResponse();
        $httpRequest  = $this->createHttpRequest($request);
        $httpResponse = $this->client->send($httpRequest);
        $json         = $httpResponse->json();

        $response->name   = $request->name;
        $response->nVal   = $json['n_val'];
        $response->schema = $json['schema'];

        return $response;
    }
1050194
public function handle(Request $request)
	{
		// execute response
		$response = $this->next($request);

		// only do this if user wants it expanded
		if (!$expand = $request->getVar('expand', null))
		{
			return $response;
		}

		// normalize keys
		$expandKeys = $this->normalizeExpandKeys($expand);

		// only do on json data
		if (!$response->isJson())
		{
			return $response;
		}

		// get the response content and json decode
		$content = json_decode($response->getContent());

		// make sure to handle array different then a single object
		if (is_array($content))
		{
			// loop through each item in array and covert dates
			foreach ($content as $key => $value)
			{
				$content[$key] = $this->convertExpandKeysInObjects($expandKeys, $value);
			}
		}
		else
		{
			// convert single object dates
			$content = $this->convertExpandKeysInObjects($expandKeys, $content);
		}

		// set the response content to modified content
		$response->setContent(json_encode($content));

		// return response
		return $response;
	}
1305804
public function send(Request $request)
    {
        $response     = new GetSchemaResponse();
        $httpRequest  = $this->createHttpRequest($request);
        $httpResponse = $this->client->send($httpRequest);

        $response->name    = $request->name;
        $response->content = (string) $httpResponse->getBody();

        return $response;
    }
1279098
public function sendRequest(Request $request)
    {
        $response = $this->httpClient->send($request);

        $this->checkErrorResponse($response);

        return $response;
    }
416424
public function postAction(Request $request)
    {
        $action = $request->get('action');
        $document = $this->getDocumentManager()->create(self::DOCUMENT_TYPE);
        $locale = $this->getRequestParameter($request, 'locale', true);
        $data = $request->request->all();

        $this->persistDocument($data, $document, $locale);
        $this->handleActionParameter($action, $document, $locale);
        $this->getDocumentManager()->flush();

        return $this->handleView(
            $this->view($document)->setSerializationContext(
                SerializationContext::create()
                    ->setSerializeNull(true)
                    ->setGroups(['defaultPage', 'defaultArticle', 'smallArticlePage'])
            )
        );
    }
144952
public function updateAction(Request $request): Response
    {
        $form = $this->formFactory->updateLocation();
        $form->handleRequest($request);

        $location = $form->getData()->getLocation();

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (LocationUpdateData $data) {
                $location = $data->getLocation();

                $locationUpdateStruct = new LocationUpdateStruct(['sortField' => $data->getSortField(), 'sortOrder' => $data->getSortOrder()]);
                $this->locationService->updateLocation($location, $locationUpdateStruct);

                $this->notificationHandler->success(
                    $this->translator->trans(
                        /** @Desc("Location '%name%' updated.") */
                        'location.update.success',
                        ['%name%' => $location->getContentInfo()->name],
                        'location'
                    )
                );

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

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

        return $this->redirect($this->generateUrl('_ezpublishLocation', [
            'locationId' => $location->getContentInfo()->mainLocationId,
            '_fragment' => DetailsTab::URI_FRAGMENT,
        ]));
    }
1246983
public function send(Request $request)
    {
        $this->monitor->start($this->metricName, ['service_key' => $request->getServiceKey(), 'request_key' => $request->getRequestKey()]);
        $response = $this->sender->send($request);
        $this->monitor->end($this->metricName, ['response_status' => $response->getStatusCode()]);
        return $response;
    }