Psr18ClientDiscovery::find(): WordPressAiClientDependenciesPsrHttpClientClientInterface

In this article

Finds a PSR-18 HTTP Client.

Return

WordPressAiClientDependenciesPsrHttpClientClientInterface

Source

public static function find()
{
    try {
        $client = static::findOneByType(ClientInterface::class);
    } catch (DiscoveryFailedException $e) {
        throw new RealNotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle7-adapter".', 0, $e);
    }
    return static::instantiateClass($client);
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.