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.

No Hooks.

Usage

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

Methods

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

Changelog

Since 0.1.0 Introduced.

HttpTransporterInterface{} code 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;
}