diff --git a/src/PubSubClient.php b/src/PubSubClient.php index 926ce1b..8586a27 100644 --- a/src/PubSubClient.php +++ b/src/PubSubClient.php @@ -196,6 +196,10 @@ public function __construct(array $config = []) $config['universeDomain'] ); + if ($config['transport'] !== 'rest') { + $this->encode = true; + } + $this->projectId = $this->detectProjectId($config); $this->clientConfig = $config;