WP_AI_Client_Discovery_Strategy::createClient( WordPressAiClientDependenciesNyholmPsr7FactoryPsr17Factory $psr17_factory ): WordPressAiClientDependenciesPsrHttpClientClientInterface

In this article

Creates an instance of the WordPress HTTP client.

Parameters

$psr17_factoryWordPressAiClientDependenciesNyholmPsr7FactoryPsr17Factoryrequired
The PSR-17 factory for creating HTTP messages.

Return

WordPressAiClientDependenciesPsrHttpClientClientInterface The PSR-18 HTTP client.

Source

protected static function createClient( Psr17Factory $psr17_factory ): ClientInterface {
	return new WP_AI_Client_HTTP_Client( $psr17_factory, $psr17_factory );
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

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