Title: HttpTransporter::isGuzzleClient
Published: May 20, 2026
Last modified: August 20, 2026

---

# HttpTransporter::isGuzzleClient( WordPressAiClientDependenciesPsrHttpClientClientInterface $client ): bool

## In this article

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

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.

Determines if the underlying client matches the Guzzle client shape.

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

 `$client`WordPressAiClientDependenciesPsrHttpClientClientInterfacerequired

The HTTP client instance.

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

 bool True when the client exposes Guzzle’s send signature.

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

    ```php
    private function isGuzzleClient(ClientInterface $client): bool
    {
        $reflection = new \ReflectionObject($client);
        if (!is_callable([$client, 'send'])) {
            return \false;
        }
        if (!$reflection->hasMethod('send')) {
            return \false;
        }
        $method = $reflection->getMethod('send');
        if (!$method->isPublic() || $method->isStatic()) {
            return \false;
        }
        $parameters = $method->getParameters();
        if (count($parameters) < 2) {
            return \false;
        }
        $firstParameter = $parameters[0]->getType();
        if (!$firstParameter instanceof \ReflectionNamedType || $firstParameter->isBuiltin()) {
            return \false;
        }
        if (!is_a($firstParameter->getName(), RequestInterface::class, \true)) {
            return \false;
        }
        $secondParameter = $parameters[1];
        $secondType = $secondParameter->getType();
        if (!$secondType instanceof \ReflectionNamedType || $secondType->getName() !== 'array') {
            return \false;
        }
        return \true;
    }
    ```

[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.1/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L140)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php#L140-L170)

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

| 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/isguzzleclient/?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%2Fisguzzleclient%2F)
before being able to contribute a note or feedback.