Пример #1
0
 /**
  * Execute the given http request.
  *
  * @param Request       $request
  * @param callable|null $processor
  *
  * @throws RateLimitedReached
  *
  * @return Response The response.
  */
 public function execute(Request $request, $processor = null)
 {
     $response = $this->auth->execute($request);
     if ($response->rateLimited()) {
         throw new RateLimitedReached($response);
     }
     if (is_callable($processor)) {
         $response = $this->processResponse($response, $processor);
     }
     return $response;
 }