@EXT\Route(
"/messages/send",
name="apiv2_plannednotificationmessage_messages_send"
)

@param Request $request

@return JsonResponse
161334
public function messagesSendAction(Request $request)
    {
        $query = $request->request->all();
        $messages = $this->om->findList('Claroline\PlannedNotificationBundle\Entity\Message', 'uuid', $query['messages']);
        $users = $this->om->findList('Claroline\CoreBundle\Entity\User', 'uuid', $query['users']);
        $this->manager->sendMessages($messages, $users);

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

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

        return $response;
    }
1009440
public function hook(Request $request): JsonResponse
    {
        (new Collection($request->input('events', [])))
            ->filter(function ($event): bool {
                return Arr::get($event, 'name') === 'channel_vacated';
            })
            ->each(function (array $event): void {
                $this->storage->deleteSubscriber(
                    Arr::get($event, 'channel')
                );
            });

        return response()->json(['message' => 'okay']);
    }
1070957
public function sendRequest(RequestInterface $request): Message
    {
        $startTime = \microtime(true);

        $exception = null;
        try {
            $response = $this->httpClient->send($request);
        } catch (ClientException $exception) {
            $response = $exception->hasResponse()
                ? $exception->getResponse()
                : null;

            $exception = $this->createCustomException($exception);
        }

        $duration = \microtime(true) - $startTime;

        return new Message(
            $this->api,
            $duration,
            $request,
            $response,
            $exception
        );
    }
1353315
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);
        }

        return $response;
    }
269833
public function deliverMessage(MessageRequest $request) {
    $this->setRequestUrl('/message');
    $this->setRequestMethod('POST');
    $this->setRequestObject($request);

    try {
      $this->execute();
    } catch (Exception $e) {
      throw $e;
    }
  }
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;
    }
845539
public function sendResetLinkEmail(Request $request)
    {
        //$this->validate($request, ['email' => 'required|email']);

        $userId = Signup::where('mobile_number', $request->all('mobile_number'))->value('user_id');
        $user = User::find($userId);
        $response = Password::INVALID_USER;
        if ( $user ) {
            $email = [ 'email' => $user->email ];
            // $email = $request->only('email');

            // We will send the password reset link to this user. Once we have attempted
            // to send the link, we will examine the response then see the message we
            // need to show to the user. Finally, we'll send out a proper response.
            $response = $this->broker()->sendResetLink(
                $email, $this->resetNotifier()
            );

            if ($response === Password::RESET_LINK_SENT) {

                //return trans($response);
            }
        }

        // If an error was returned by the password broker, we will get this message
        // translated so we can notify a user of the problem. We'll redirect back
        // to where the users came from so they can attempt this process again.
        //return back()->withErrors(
        //    ['email' => trans($response)]
        //);

        switch ($response)
        {
            case Password::RESET_LINK_SENT:
                return response()->json(['success' => 'true','message'=> "Password recovery link has been send to your email address"]);
                exit;
            case Password::INVALID_USER:
                return response()->json(['error' => 'invalid_credentials','data'=> "We can't find a user that matches these credentials"], 404);
                exit;
        }
    }
1003539
public function send(Request $request)
    {
        $response   = new PutIndexResponse();
        $rpbPutReq  = $this->createRpbMessage($request);

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

        return $response;
    }
874128
protected function doRequest(Request $request)
    {

        $this->client->send($request, $response = new Response());

        return $response;
    }
947362
private function sendFailedLoginResponse(Request $request, $message = '')
    {
        $errors = [$this->username() => strlen($message) > 2 ? $message : trans('auth.failed')];

        if ($request->expectsJson()) {
            return response()->json($errors, 422);
        }

        return redirect()
            ->back()
            ->withInput($request->only($this->username(), 'remember'))
            ->withErrors($errors);
    }
79715
public function send(Request $request)
    {
        $response   = new PutResponse();
        $rpbPutReq  = $this->createRpbMessage($request);

        $this->client->send($rpbPutReq, RiakMessageCodes::SET_BUCKET_REQ, RiakMessageCodes::SET_BUCKET_RESP);

        return $response;
    }
507450
protected function _send(Request $request)
    {
        $deadline = false;
        if (isset($this->_contextOptions['timeout']) && $this->_contextOptions['timeout'] > 0) {
            $deadline = time() + $this->_contextOptions['timeout'];
        }

        $url = $request->getUri();
        $this->_open($url);
        $content = '';
        $timedOut = false;

        while (!feof($this->_stream)) {
            if ($deadline !== false) {
                stream_set_timeout($this->_stream, max($deadline - time(), 1));
            }

            $content .= fread($this->_stream, 8192);

            $meta = stream_get_meta_data($this->_stream);
            if ($meta['timed_out'] || ($deadline !== false && time() > $deadline)) {
                $timedOut = true;
                break;
            }
        }
        $meta = stream_get_meta_data($this->_stream);
        fclose($this->_stream);

        if ($timedOut) {
            throw new HttpException('Connection timed out ' . $url, 504);
        }

        $headers = $meta['wrapper_data'];
        if (isset($headers['headers']) && is_array($headers['headers'])) {
            $headers = $headers['headers'];
        }

        return $this->createResponses($headers, $content);
    }
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;
    }
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;
    }
434747
public function send(Request $request)
    {
        $httpRequest  = $this->createHttpRequest($request);
        $response     = new DeleteResponse();
        $httpResponse = $this->client->send($httpRequest);
        $code         = $httpResponse->getStatusCode();

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

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

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

        return $response;
    }
236277
private function send(Request $request)
    {
        $options = [
            'base_uri' => self::BASE_URI,
            'http_errors' => false,
        ];

        return $this->client->send($request, $options);
    }