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

@return \Riak\Client\Core\Message\DataType\PutResponse
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;
    }
46153
public function sendRequest($request)
	{
		// Check if request was passed in
		if (!$request) {
			throw new InvalidArgumentException('No data was passed into the provision request');
		}

		return $this->client->post($this->prv_url, [
			'Content-type'             => 'text/xml',
			'Content-length'           => strlen($request),
			'MMProvision-Access-Token' => $this->prv_token,
		], $request);
	}
1008938
public function send(Request $request)
    {
        $httpRequest  = $this->createHttpRequest($request);
        $httpResponse = $this->client->send($httpRequest);
        $code         = $httpResponse->getStatusCode();
        $response     = new PutResponse();

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

        $contentList = $this->getRiakContentList($httpResponse);
        $vClock      = $httpResponse->getHeader('X-Riak-Vclock');
        $key         = null;

        if ($httpResponse->hasHeader('Location')) {
            $location = $httpResponse->getHeader('Location');
            $key      = substr($location, strrpos($location, '/') + 1);
        }

        $response->key         = $key;
        $response->vClock      = $vClock;
        $response->contentList = $contentList;

        return $response;
    }
480335
public function toResponse($request)
    {
        return (
            $this->resource instanceof AbstractPaginator
                ? new PaginatedResourceResponse($this)
                : new ResourceResponse($this)
        )->toResponse($request);
    }
381808
private function createRpbMessage(GetRequest $request)
    {
        $rpbGetReq = new RpbGetBucketReq();

        $rpbGetReq->setBucket($request->bucket);
        $rpbGetReq->setType($request->type);

        return $rpbGetReq;
    }
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;
    }
315373
public function putCollectionAction(Request $request)
    {
        $result = [];
        foreach ($request->request->all() as $data) {
            if (!isset($data['type']) || !isset($data['uid'])) {
                throw new BadRequestHttpException("type and/or uid is missing.");
            }

            try {
                $content = $this->updateClassContent($data['type'], $data['uid'], $data);
                $this->granted('VIEW', $content);
                $this->granted('EDIT', $content);

                $result[] = [
                    'uid'        => $content->getUid(),
                    'type'       => $content->getContentType(),
                    'statusCode' => 200,
                    'message'    => 'OK',
                ];
            } catch (AccessDeniedException $e) {
                $result[] = [
                    'uid'        => $data['uid'],
                    'type'       => $data['type'],
                    'statusCode' => 401,
                    'message'    => $e->getMessage(),
                ];
            } catch (\Exception $e) {
                $result[] = [
                    'uid'        => $data['uid'],
                    'type'       => $data['type'],
                    'statusCode' => 500,
                    'message'    => $e->getMessage(),
                ];
            }
        }

        $this->getEntityManager()->flush();

        return $this->createJsonResponse($result);
    }
201558
public function setRequest(Request $request)
    {
        $context = (new RequestContext())->fromRequest($request);

        $this->cachedRoot = null;
        $this->cachedSchema = null;
        return $this->setContext($context);
    }
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;
    }
103568
public function put($uri, AbstractRequest $request = null)
    {
        $http = $this->getHttpClone();

        $http->setOption(CURLOPT_CUSTOMREQUEST, 'PUT');
        $http->setOption(CURLOPT_URL, $uri);
        if ($request) {
            $http->setOption(CURLOPT_POSTFIELDS, $this->buildPostData($request->getQuery()));
        }

        return $http->execute();
    }
439467
public function store(UploadImageRequest $request)
    {
        $upload = $this->uploader->upload($request->file('image'), storage_path('app/laramanager/images'));

        return $this->imageRepository->create($upload->toArray());
    }
171381
public function put(Request $request)
    {
        $token = Arr::get($this->getContentAsArray($request), 'token');

        // Ensure token is valid
        $token = $this->userService->findTokenBy([
            'token'         => $token,
            'token_type_id' => TokenEntity::TYPE_RESET_PASSWORD,
        ]);

        if (! $token) {
            return $this->createNotFoundResponse();
        }

        if ($token->getExpires() < time()) {
            return $this->createNotFoundResponse();
        }

        $user = $this->userService->findById($token->getUserId());

        if (! $user) {
            return $this->createNotFoundResponse();
        }

        $password = Arr::get($this->getContentAsArray($request), 'password');

        // Ensure user input is valid
        if (! $password) {
            return $this->createErrorResponse(['password' => ['EMPTY']], 422);
        }

        $this->userService->resetPassword($user, $password);

        $this->userService->deleteToken($token);

        return $this->userArrayWithoutPassword($user);
    }
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()
        );
    }
365821
public function send(Request $request)
    {
        $response   = new GetResponse();
        $rpbGetReq  = $this->createRpbMessage($request);
        $rpbGetResp = $this->client->send($rpbGetReq, RiakMessageCodes::GET_REQ, RiakMessageCodes::GET_RESP);

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

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

        $response->vClock      = $rpbGetResp->getVclock()->get();
        $response->contentList = $this->createContentList($rpbGetResp->getContentList());

        return $response;
    }
464439
public function send(Request $request)
    {
        $response     = new PutSchemaResponse();
        $httpRequest  = $this->createHttpRequest($request);

        $this->client->send($httpRequest);

        return $response;
    }
657838
public function create(StoreRequest $request)
    {
        $data = $request->all();

        $object = $this->repository->create($data);

        \Cache::tags('response')->flush();

        return $this->response->resource($object);
    }
20960
public function store(Request $request)
    {
        // insert key and value in settings table
        $settings = Settings::all()->keyBy('settingsKey')->toArray();

        foreach ($request->form as $key => $value){
            if(!isset($settings[$key])) {
                $settings[$key] = ["settingsKey" => $key, "value" => $value];
            }
            $settings[$key]['value'] = ($value ? $value : null);
        }

        if(Settings::truncate()) {
            Settings::insert($settings);
        }

        // if request is being made from general settings
        if($request->settingsType == 'general') {
            if(isset($settings['defaultLanguage']) 
                && ((int) $settings['defaultLanguage']['value'] !== Language::getDefault()->languageID)
            ) {
                    // remove the current default language ( set it to non-default ) if this new one is the default
                    Language::where('isDefault', 1)->update(['isDefault' => 0]);
                    // set the new default language
                    $defaultLanguage = $request->form['defaultLanguage'];
                    Language::find($defaultLanguage)->update(['isDefault' => 1]);
            }

        }

        return $this->response('Settings are saved', 200);
    }