WordPress\AiClient\Providers\Http
HttpTransporterFactory::createTransporter
Creates an HTTP transporter.
Uses HTTPlug Discovery to automatically find PSR-18 client and PSR-17 factories if not provided.
Метод класса: HttpTransporterFactory{}
Хуков нет.
Возвращает
HttpTransporterInterface. The HTTP transporter.
Использование
$result = HttpTransporterFactory::createTransporter(): HttpTransporterInterface;
Список изменений
| С версии 0.1.0 | Введена. |
Код HttpTransporterFactory::createTransporter() HttpTransporterFactory::createTransporter WP 7.1.4
public static function createTransporter(): HttpTransporterInterface
{
return new \WordPress\AiClient\Providers\Http\HttpTransporter(Psr18ClientDiscovery::find(), Psr17FactoryDiscovery::findRequestFactory(), Psr17FactoryDiscovery::findStreamFactory());
}