WordPress\AiClient\Providers\Http\Contracts

HttpTransporterInterface{}interfaceWP 0.1.0

Interface for HTTP transport implementations.

Handles sending HTTP requests and receiving responses using PSR-7, PSR-17, and PSR-18 standards internally.

Хуков нет.

Использование

$HttpTransporterInterface = new HttpTransporterInterface();
// use class methods

Методы

  1. public send(Request $request, ?RequestOptions $options = null)

Список изменений

С версии 0.1.0 Введена.

Код HttpTransporterInterface{} WP 7.0

interface HttpTransporterInterface
{
    /**
     * Sends an HTTP request and returns the response.
     *
     * @since 0.1.0
     *
     * @param Request $request The request to send.
     * @param RequestOptions|null $options Optional transport options for the request.
     * @return Response The response received.
     */
    public function send(Request $request, ?RequestOptions $options = null): Response;
}