@param \Riak\Client\Core\Message\Bucket\PutRequest $request

@return \Riak\Client\ProtoBuf\RpbSetBucketReq
350717
private function createRpbMessage(PutRequest $request)
    {
        $rpbPutReq = new RpbSetBucketReq();
        $rpbProps  = new RpbBucketProps();

        $rpbProps->r               = $this->encodeQuorum($request->r);
        $rpbProps->w               = $this->encodeQuorum($request->w);
        $rpbProps->dw              = $this->encodeQuorum($request->dw);
        $rpbProps->rw              = $this->encodeQuorum($request->rw);
        $rpbProps->pr              = $this->encodeQuorum($request->pr);
        $rpbProps->pw              = $this->encodeQuorum($request->pw);
        $rpbProps->n_val           = $request->nVal;
        $rpbProps->allow_mult      = $request->allowMult;
        $rpbProps->last_write_wins = $request->lastWriteWins;
        $rpbProps->old_vclock      = $request->oldVclock;
        $rpbProps->young_vclock    = $request->youngVclock;
        $rpbProps->big_vclock      = $request->bigVclock;
        $rpbProps->small_vclock    = $request->smallVclock;
        $rpbProps->basic_quorum    = $request->basicQuorum;
        $rpbProps->notfound_ok     = $request->notfoundOk;
        $rpbProps->backend         = $request->backend;
        $rpbProps->search          = $request->search;
        $rpbProps->search_index    = $request->searchIndex;
        $rpbProps->datatype        = $request->datatype;
        $rpbProps->consistent      = $request->consistent;

        if ($request->linkwalkFunction) {
            $rpbProps->setLinkfun($this->createRpbModFun($request->linkwalkFunction));
        }

        if ($request->chashKeyFunction) {
            $rpbProps->setChashKeyfun($this->createRpbModFun($request->chashKeyFunction));
        }

        foreach ($request->precommitHooks as $hook) {
            $rpbProps->addPrecommit($this->createRpbCommitHook($hook));
        }

        foreach ($request->postcommitHooks as $hook) {
            $rpbProps->addPostcommit($this->createRpbCommitHook($hook));
        }

        $rpbPutReq->setBucket($request->bucket);
        $rpbPutReq->setType($request->type);
        $rpbPutReq->setProps($rpbProps);

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

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

        $multipartIterator  = new MultipartResponseIterator($httpResponse);
        $responseIterator   = new HttpIndexQueryResponseIterator($request, $multipartIterator);
        $response->iterator = $responseIterator;

        return $response;
    }
1281053
public static function convert(Request $request)
    {
        $stream = fopen('php://temp', 'rw');

        fwrite($stream, (string) $request->headers."\r\n");

        stream_copy_to_stream($request->getContent(true), $stream);

        rewind($stream);

        return new StreamedPart($stream);
    }
662324
public function toResponse($request)
    {
        $resource = new FractalItem(
            $this->item,
            app()->make('InetStudio\PollsPackage\Polls\Contracts\Transformers\Back\Resource\ShowTransformerContract')
        );

        $serializer = app()->make('InetStudio\AdminPanel\Base\Contracts\Serializers\SimpleDataArraySerializerContract');

        $manager = new Manager();
        $manager->setSerializer($serializer);

        $transformation = $manager->createData($resource)->toArray();
        $transformation['success'] = ((bool) $transformation['id']);

        return response()->json($transformation);
    }
693075
private function createRpbMessage(PutRequest $request)
    {
        $rpbPutReq = new DtUpdateReq();
        $crdtOp    = $this->opConverter->toProtoBuf($request->op);

        $rpbPutReq->setBucket($request->bucket);
        $rpbPutReq->setType($request->type);
        $rpbPutReq->setKey($request->key);

        if ($request->w !== null) {
            $rpbPutReq->setW($this->encodeQuorum($request->w));
        }

        if ($request->dw !== null) {
            $rpbPutReq->setDw($this->encodeQuorum($request->dw));
        }

        if ($request->pw !== null) {
            $rpbPutReq->setPw($this->encodeQuorum($request->pw));
        }

        if ($request->returnBody !== null) {
            $rpbPutReq->setReturnBody($request->returnBody);
        }

        if ($request->includeContext !== null) {
            $rpbPutReq->setIncludeContext($request->includeContext);
        }

        if ($request->context !== null) {
            $rpbPutReq->setContext($request->context);
        }

        $rpbPutReq->setOp($crdtOp);

        return $rpbPutReq;
    }
1128533
public function toResponse($request)
    {
        return $this->resource instanceof AbstractPaginator
                    ? (new PaginatedResourceResponse($this))->toResponse($request)
                    : parent::toResponse($request);
    }
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;
    }
937626
private function createRpbMessage(GetSchemaRequest $request)
    {
        $rpbGetReq = new RpbYokozunaSchemaGetReq();

        $rpbGetReq->setName($request->name);

        return $rpbGetReq;
    }
526783
private function createRpbMessage(PutIndexRequest $request)
    {
        $rpbIndex  = new RpbYokozunaIndex();
        $rpbPutReq = new RpbYokozunaIndexPutReq();

        $rpbPutReq->setIndex($rpbIndex);
        $rpbIndex->setNVal($request->nVal);
        $rpbIndex->setName($request->name);
        $rpbIndex->setSchema($request->schema);

        return $rpbPutReq;
    }
582237
public function putAction( ServerRequestInterface $request )
	{
		if( config( 'shop.authorize', true ) ) {
			$this->authorize( 'admin', [JsonadmController::class, ['admin', 'api']] );
		}

		return $this->createAdmin()->put( $request, new Response() );
	}
269793
public static function updateRequest($request) {
        $routeModel = Dir::apiModel(static::$model);
        $heroe = $routeModel::find($request->id);

        foreach($heroe->getTuples() as $tuple)
            if(!empty($request->$tuple))
                $heroe->$tuple = $request->$tuple;

        $heroe->update();
        return $heroe;
    }
1149897
protected function sendRequestThroughRouter($request)
    {
        $this->refreshRequest($request = Request::createFromBase($request));

        $this->boot();

        // Create a Pipeline instance.
        $pipeline = new Pipeline(
            $this, $this->shouldSkipMiddleware() ? array() : $this->middleware
        );

        return $pipeline->handle($request, function ($request)
        {
            $this->instance('request', $request);

            return $this->router->dispatch($request);
        });
    }
781760
public function send(Request $request)
    {
        $curlOptions = [
            CURLOPT_CUSTOMREQUEST => $request->getMethod(),
            CURLOPT_URL => $request->getUri(),
        ];

        if (\in_array($request->getMethod(), ['POST', 'PUT', 'PATCH'], true)) {
            $curlOptions[CURLOPT_POSTFIELDS] = $request->getBody();
        }

        $response = $this->exec($curlOptions, $request->getHeaders());
        if (!$response->isOkay()) {
            $this->logger->warning(
                \sprintf('REQUEST=%s, RESPONSE=%s', $request, $response)
            );
        }

        return $response;
    }
174741
private function buildRequest($request): GenericRequest
    {
        if ($request instanceof GenericRequest) {
            $this->logger->debug('request object used as is');

            return $request;
        }

        $requestFactory = new GenericRequestFactory();

        if ($request instanceof MessageInterface) {
            $this->logger->debug('request object created from PSR-7 http message');

            return $requestFactory->createRequestFromPsr7Message($request);
        }

        if (is_array($request)) {
            $this->logger->debug('request object created from array');

            return $requestFactory->createRequestFromArray($request);
        }

        if (is_string($request)) {
            $this->logger->debug('request object created from string');

            return $requestFactory->createRequestFromString($request);
        }

        throw new UnexpectedValueException(
            'the request parameter has to be a string, an array or an instance of \Psr\Http\Message\MessageInterface'
        );
    }
1231517
private function createRpbMessage(ListRequest $request)
    {
        $rpbGetReq = new RpbListBucketsReq();

        if ($request->timeout != null) {
            $rpbGetReq->setTimeout($request->timeout);
        }

        if ($request->type != null) {
            $rpbGetReq->setType($request->type);
        }

        $rpbGetReq->setStream(true);

        return $rpbGetReq;
    }
1223058
public function putRequest()
    {
        $operation = array(
            'API' => 'PutBucket',
            'Method' => 'PUT',
            'Uri' => '/<bucket-name>',
            'Headers' => array(
                'Host' => $this->properties['zone'] . '.' . $this->config->host,
            ),
            'Params' => array(
            ),
            'Elements' => array(
            ),
            'Properties' => $this->properties,
            'Body' => null
        );
        $this->putValidate($operation);
        $req = new Request($this->config, $operation);
        return $req;
    }
600130
private function post($request)
    {
        try {
            $responseGuzzle = $this->client->request('post', $this->url, $request->build());
        } catch (ClientException $e) {
            $responseGuzzle = $e->getResponse();
        }

        return $responseGuzzle;
    }