Creates an instance of the HTTP client.
Description
Subclasses must implement this method to return their specific PSR-18 HTTP client instance. The provided Psr17Factory implements all PSR-17 interfaces (RequestFactory, ResponseFactory, StreamFactory, etc.) and can be used to satisfy client constructor dependencies.
Parameters
$psr17FactoryWordPressAiClientDependenciesNyholmPsr7FactoryPsr17Factoryrequired- The PSR-17 factory for creating HTTP messages.
Source
abstract protected static function createClient(Psr17Factory $psr17Factory): ClientInterface;
Changelog
| Version | Description |
|---|---|
| 1.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.