CoreFiles by mySites.guru
ClientWithOptionsInterface.php29 lines, 1,025 bytes, from wordpress-7.1.2.zip
Raw History Compare with 7.1.1
md5
79eca5d0a6919c0ee81dba27d118f506
sha1
37fb0e51baf15e6d7b3b218d77396b5e2514549e
sha256
537bf583d5d5182ef0a4261edffe6eb4449589226d90828b652665e3efcc53be
<?php

declare (strict_types=1);
namespace WordPress\AiClient\Providers\Http\Contracts;

use WordPress\AiClientDependencies\Psr\Http\Message\RequestInterface;
use WordPress\AiClientDependencies\Psr\Http\Message\ResponseInterface;
use WordPress\AiClient\Providers\Http\DTO\RequestOptions;
/**
 * Interface for HTTP clients that support per-request transport options.
 *
 * Extends the capabilities of PSR-18 clients by allowing custom transport
 * configuration such as timeouts and redirect handling on each request.
 *
 * @since 0.2.0
 */
interface ClientWithOptionsInterface
{
    /**
     * Sends an HTTP request with the given transport options.
     *
     * @since 0.2.0
     *
     * @param RequestInterface $request The PSR-7 request to send.
     * @param RequestOptions $options The request transport options. Must not be null.
     * @return ResponseInterface The PSR-7 response received.
     */
    public function sendRequestWithOptions(RequestInterface $request, RequestOptions $options): ResponseInterface;
}

The same content is in 41 releases, WordPress 7.0-beta1 to 7.2-RC1. See them all, or every version of this file.