[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/php-ai-client/src/Providers/Http/Contracts/ -> ClientWithOptionsInterface.php (source)

   1  <?php
   2  
   3  declare (strict_types=1);
   4  namespace WordPress\AiClient\Providers\Http\Contracts;
   5  
   6  use WordPress\AiClientDependencies\Psr\Http\Message\RequestInterface;
   7  use WordPress\AiClientDependencies\Psr\Http\Message\ResponseInterface;
   8  use WordPress\AiClient\Providers\Http\DTO\RequestOptions;
   9  /**
  10   * Interface for HTTP clients that support per-request transport options.
  11   *
  12   * Extends the capabilities of PSR-18 clients by allowing custom transport
  13   * configuration such as timeouts and redirect handling on each request.
  14   *
  15   * @since 0.2.0
  16   */
  17  interface ClientWithOptionsInterface
  18  {
  19      /**
  20       * Sends an HTTP request with the given transport options.
  21       *
  22       * @since 0.2.0
  23       *
  24       * @param RequestInterface $request The PSR-7 request to send.
  25       * @param RequestOptions $options The request transport options. Must not be null.
  26       * @return ResponseInterface The PSR-7 response received.
  27       */
  28      public function sendRequestWithOptions(RequestInterface $request, RequestOptions $options): ResponseInterface;
  29  }


Generated : Sat Jun 13 09:38:55 2026 Cross-referenced by PHPXref