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

Breadcrumb

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

function HttpAsyncClientDiscovery::find

Finds an HTTP Async Client.

Return value

HttpAsyncClient

Throws

Exception\NotFoundException

1 call to HttpAsyncClientDiscovery::find()
HttpPlugClientResolver::resolveHttpPlugAsyncClient in vendor/open-telemetry/sdk/Common/Adapter/HttpDiscovery/HttpPlugClientResolver.php

File

vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php, line 22

Class

HttpAsyncClientDiscovery
Finds an HTTP Asynchronous Client.

Namespace

Http\Discovery

Code

public static function find() {
    try {
        $asyncClient = static::findOneByType(HttpAsyncClient::class);
    } catch (DiscoveryFailedException $e) {
        throw new NotFoundException('No HTTPlug async clients found. Make sure to install a package providing "php-http/async-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e);
    }
    return static::instantiateClass($asyncClient);
}

API Navigation

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