@param \Riak\Client\Core\Message\Schema\PutSchemaRequest $request

@return \Riak\Client\Core\Message\Schema\PutSchemaResponse
429496
public function send(Request $request)
    {
        $response   = new PutSchemaResponse();
        $rpbPutReq  = $this->createRpbMessage($request);

        $this->client->send($rpbPutReq, RiakMessageCodes::YOKOZUNA_SCHEMA_PUT_REQ, RiakMessageCodes::PUT_RESP);

        return $response;
    }
309829
public function put($request, $parameters = array())
        {
            return $this->request(
                $this->getAbsoluteUrl($request),
                $this->generateParameters($parameters),
                'PUT'
            );
        }
861091
public function send(Request $request)
    {
        $response   = new GetSchemaResponse();
        $rpbGetReq  = $this->createRpbMessage($request);
        $rpbGetResp = $this->client->send($rpbGetReq, RiakMessageCodes::YOKOZUNA_SCHEMA_GET_REQ, RiakMessageCodes::YOKOZUNA_SCHEMA_GET_RESP);

        if ( ! $rpbGetResp instanceof RpbYokozunaSchemaGetResp) {
            return $response;
        }

        if ( ! $rpbGetResp->hasSchema()) {
            return $response;
        }

        $response->name    = $rpbGetResp->schema->name;
        $response->content = $rpbGetResp->schema->content;

        return $response;
    }
473623
public function process(PlaceDetailRequestInterface $request)
    {
        $httpRequest = $this->createRequest($request);
        $httpResponse = $this->getClient()->sendRequest($httpRequest);

        $response = $this->deserialize(
            $httpResponse,
            PlaceDetailResponse::class,
            (new Context())->setNamingStrategy(new SnakeCaseNamingStrategy())
        );

        $response->setRequest($request);

        return $response;
    }
349853
public function send(Request $request)
    {
        $response   = new GetIndexResponse();
        $rpbGetReq  = $this->createRpbMessage($request);
        $rpbGetResp = $this->client->send($rpbGetReq, RiakMessageCodes::YOKOZUNA_INDEX_GET_REQ, RiakMessageCodes::YOKOZUNA_INDEX_GET_RESP);

        if ( ! $rpbGetResp instanceof RpbYokozunaIndexGetResp) {
            return $response;
        }

        if ( ! $rpbGetResp->hasIndex()) {
            return $response;
        }

        $rpbIndex = is_array($rpbGetResp->index)
            ? reset($rpbGetResp->index)
            : $rpbGetResp->index;

        $response->nVal   = $rpbIndex->n_val;
        $response->name   = $rpbIndex->name;
        $response->schema = $rpbIndex->schema;

        return $response;
    }
1324128
protected function doRequest($request)
    {
        $slimRequest = $this->convertRequest($request);

        $container = $this->app->getContainer();

        /* @var $slimResponse ResponseInterface */
        $slimResponse = $container->get('response');

        // reset body stream
        $slimResponse = $slimResponse->withBody(new Stream(fopen('php://temp', 'w+')));

        $slimResponse = $this->app->process($slimRequest, $slimResponse);

        return new BrowserKitResponse(
            (string) $slimResponse->getBody(),
            $slimResponse->getStatusCode(),
            $slimResponse->getHeaders()
        );
    }
471128
public function remoteEditFormSchema(HTTPRequest $request)
    {
        $schemaID = $request->getURL();
        try {
            $form = $this->remoteEditForm();
            return $this->getSchemaResponse($schemaID, $form);
        } catch (InvalidUrlException $exception) {
            $errors = ValidationResult::create()
                ->addError($exception->getMessage());
            // @todo - Don't create dummy form (pass $form = null)
            $form = Form::create(null, 'Form', FieldList::create(), FieldList::create());
            $code = $exception->getCode();

            if ($code < 300) {
                $code = 500;
            }

            return $this
                ->getSchemaResponse($schemaID, $form, $errors)
                ->setStatusCode($code);
        }
    }
782269
public function send(Request $request)
    {
        $response   = new PutResponse();
        $rpbPutReq  = $this->createRpbMessage($request);
        $rpbPutResp = $this->client->send($rpbPutReq, RiakMessageCodes::DT_UPDATE_REQ, RiakMessageCodes::DT_UPDATE_RESP);

        if ( ! $rpbPutResp instanceof DtUpdateResp) {
            return $response;
        }

        if ($rpbPutResp->hasContext()) {
            $response->context = $rpbPutResp->context;
        }

        if ($rpbPutResp->hasCounterValue()) {
            $response->value = $rpbPutResp->counter_value;
            $response->type  = 'counter';
        }

        if ($rpbPutResp->hasSetValue()) {
            $response->value = $rpbPutResp->set_value;
            $response->type  = 'set';
        }

        if ($rpbPutResp->hasMapValue()) {
            $response->value = $this->opConverter->fromProtoBuf($rpbPutResp->map_value);
            $response->type  = 'map';
        }

        return $response;
    }
846022
public function putAction(Request $request, $key)
    {
        $webspaceKey = $this->getRequestParameter($request, 'webspace', true);
        $this->get('sulu_security.security_checker')->checkPermission(
            new SecurityCondition(SnippetAdmin::getDefaultSnippetsSecurityContext($webspaceKey)),
            PermissionTypes::EDIT
        );

        $default = $request->get('defaultUuid');

        $areas = $this->getLocalizedAreas();
        $area = $areas[$key];

        $defaultSnippet = $this->get('sulu_snippet.default_snippet.manager')->save(
            $webspaceKey,
            $key,
            $default,
            $this->getUser()->getLocale()
        );

        return new JsonResponse(
            [
                'key' => $key,
                'template' => $area['template'],
                'title' => $area['title'],
                'defaultUuid' => $defaultSnippet ? $defaultSnippet->getUuid() : null,
                'defaultTitle' => $defaultSnippet ? $defaultSnippet->getTitle() : null,
                'valid' => true,
            ]
        );
    }
1142436
public function setLocale(SetLocaleRequest $request)
    {
        $locale = $request->input('locale');

        if ( ! $this->repository->isAvailable($locale)) {
            return redirect()->back()->withErrors("Locale {$locale} is not available");
        }

        session()->put($this->getSessionKey(), $locale);

        return redirect()->back();
    }
1080104
public function updateFromRequest(Key $key, Request $request)
    {
        $key = parent::updateFromRequest($key, $request);

        return $this->saveFromRequest($key, $request);
    }
1228455
public function beforeSend(Request $request)
    {
        //Host API isn't restful so path must always self::ENDPOINT_PATH
        $request->setUrl(self::ENDPOINT_PATH);

        $headers = array(
            self::CF_INTEGRATION_HEADER => $this->config->getValue('integrationName'),
            self::CF_INTEGRTATION_VERSION_HEADER => $this->config->getValue('version'),
        );
        $request->setHeaders($headers);

        $body = $request->getBody();
        $user_key_actions = array('zone_set', 'full_zone_set');
        if (in_array(strtolower($body['act']), $user_key_actions)) {
            $body['user_key'] = $this->data_store->getHostAPIUserKey();
        }
        $body['host_key'] = $this->integrationAPI->getHostAPIKey();
        $request->setBody($body);

        return $request;
    }
182851
public function send(Request $request)
    {
        $response     = new PutResponse();
        $httpRequest  = $this->createHttpRequest($request);
        $httpResponse = $this->client->send($httpRequest);
        $code         = $httpResponse->getStatusCode();

        if ( ! isset($this->validResponseCodes[$code])) {
            throw RiakTransportException::unexpectedStatusCode($code);
        }

        if ($code === 204) {
            return $response;
        }

        $json    = $httpResponse->json();
        $context = isset($json['context']) ? $json['context'] : null;
        $value   = $json['value'];
        $type    = $json['type'];

        $response->type    = $type;
        $response->context = $context;
        $response->value   = $this->opConverter->fromArray($type, $value);

        return $response;
    }
244684
protected function createHttpRequest($request)
    {
        return new Request(
            $request->get ?? [], $request->post ?? [], [], $request->cookie ?? [], $request->files ?? [],
            $this->parseRequestServer($request), $request->rawContent()
        );
    }
839069
public function store(Request $request)
    {
        $query = $this->getQuery();

        try {
            if ($request->input('query')) {
                $filter = new Filter($this->manager->newEntity()->getTable(), $this->queryable);
                $filter->build($query, $request->input('query'));
            }
        } catch (QuerySyntaxException $e) {
            return $this->error(['code' => 'QUERY_SYNTAX_ERROR', 'message' => 'Syntax error']);
        }

        $params = $request->only($this->fillable);

        DB::beginTransaction();

        $result = new Result();

        $query->chunk(100, function ($resources) use ($params, &$result) {
            foreach ($resources as $resource) {
                $result->addErrors($this->getManager()->update($resource, $params)->getErrors());
            }
        });

        if (!$result->ok()) {
            DB::rollBack();

            return $this->response(['errors' => $result->getSimpleErrors()], Response::HTTP_BAD_REQUEST);
        }

        DB::commit();

        return $this->response(null, Response::HTTP_OK);
    }
60613
public function addToRequest(Request $request)
    {
        foreach ($this->cookies as $cookie) {
            $request = $request->withCookie($cookie->getName(), $cookie->getValue());
        }

        return $request;
    }
22004
private function recomposeSymfonyRequest(Request $request)
    {
        try{
            try {
                $content = $request->getContent(true);
            } catch (\LogicException $e) {
                $content = $request->getContent();
            }
        }catch(\LogicException $e){
            $content = file_get_contents('php://input');
        }
        return $request::create(
            $request->getUri(),
            $request->getMethod(),
            $request->getMethod() === 'PATCH' ? $request->request->all() : $request->query->all(),
            $request->cookies->all(),
            $request->files->all(),
            $request->server->all(),
            $content
        );
    }