wp-includes/ai-client/adapters/class-wp-ai-client-http-client.php:99Sends a PSR-7 request with transport options and returns a PSR-7 response.
$requestWordPress\AiClientDependencies\Psr\Http\Message\RequestInterface$optionsWordPress\AiClient\Providers\Http\DTO\RequestOptionsWordPress\AiClientDependencies\Psr\Http\Message\ResponseInterface public function sendRequestWithOptions( RequestInterface $request, RequestOptions $options ): ResponseInterface { $args = $this->prepare_wp_args( $request, $options ); $url = (string) $request->getUri(); $response = wp_safe_remote_request( $url, $args ); if ( is_wp_error( $response ) ) { $message = sprintf( /* translators: 1: HTTP method (e.g. GET, POST). 2: Request URL. 3: Error message. */ __( 'Network error occurred while sending %1$s request to %2$s: %3$s' ), $request->getMethod(), $url, $response->get_error_message() ); throw new NetworkException( $message, // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped $response->get_error_code() ? (int) $response->get_error_code() : 0 ); } return $this->create_psr_response( $response ); }Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/ai-client/adapters/class-wp-ai-client-http-client.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.