Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RetryMiddleware.php

function RetryMiddleware::__invoke

File

vendor/guzzlehttp/guzzle/src/RetryMiddleware.php, line 60

Class

RetryMiddleware
Middleware that retries requests based on the boolean result of invoking the provided "decider" function.

Namespace

GuzzleHttp

Code

public function __invoke(RequestInterface $request, array $options) : PromiseInterface {
    if (!isset($options['retries'])) {
        $options['retries'] = 0;
    }
    $fn = $this->nextHandler;
    return $fn($request, $options)->then($this->onFulfilled($request, $options), $this->onRejected($request, $options));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal