WP_AI_Client_Discovery_Strategy::createClientprotected staticWP 7.0.0

Creates an instance of the WordPress HTTP client.

Method of the class: WP_AI_Client_Discovery_Strategy{}

No Hooks.

Returns

ClientInterface. The PSR-18 HTTP client.

Usage

$result = WP_AI_Client_Discovery_Strategy::createClient( $psr17_factory ): ClientInterface;
$psr17_factory(Psr17Factory) (required)
The PSR-17 factory for creating HTTP messages.

Changelog

Since 7.0.0 Introduced.

WP_AI_Client_Discovery_Strategy::createClient() code WP 7.0

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