Title: HttpTransporter::sendWithGuzzle
Published: May 20, 2026

---

# HttpTransporter::sendWithGuzzle( WordPressAiClientDependenciesPsrHttpMessageRequestInterface $request, WordPressAiClientProvidersHttpDTORequestOptions $options ): WordPressAiClientDependenciesPsrHttpMessageResponseInterface

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Sends a request using a Guzzle-compatible client.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#parameters)󠁿

 `$request`WordPressAiClientDependenciesPsrHttpMessageRequestInterfacerequired

The PSR-7 request to send.

`$options`WordPressAiClientProvidersHttpDTORequestOptionsrequired

The request options.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#return)󠁿

 WordPressAiClientDependenciesPsrHttpMessageResponseInterface The PSR-7 response
received.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#source)󠁿

    ```php
    private function sendWithGuzzle(RequestInterface $request, RequestOptions $options): ResponseInterface
    {
        $guzzleOptions = $this->buildGuzzleOptions($options);
        /** @var callable $callable */
        $callable = [$this->client, 'send'];
        /** @var ResponseInterface $response */
        $response = $callable($request, $guzzleOptions);
        return $response;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/php-ai-client/src/providers/http/httptransporter.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L180)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L180-L188)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#related)󠁿

| Uses | Description | 
| [HttpTransporter::buildGuzzleOptions()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/buildguzzleoptions/)`wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php` |

Converts request options to a Guzzle-compatible options array.

  |

| Used by | Description | 
| [HttpTransporter::send()](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/send/)`wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php` |

{@inheritDoc}

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wordpress-aiclient-providers-http-httptransporter/sendwithguzzle/?output_format=md#changelog)󠁿

| Version | Description | 
| [0.2.0](https://developer.wordpress.org/reference/since/0.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwordpress-aiclient-providers-http-httptransporter%2Fsendwithguzzle%2F)
before being able to contribute a note or feedback.