request($method, sprintf('%s%s', self::PATH_PREFX, $uri), $options); } /** * @throws \GuzzleHttp\Exception\GuzzleException */ protected function callApiWithKey(string $method, string $uri, array $options = []): ResponseInterface { $headers = $options['headers'] ?? []; $headers[ApiKeyHeaderPlugin::HEADER_NAME] = 'valid_api_key'; $options['headers'] = $headers; return $this->callApi($method, $uri, $options); } protected function getJsonResponsePayload(ResponseInterface $resp): array { return json_decode((string) $resp->getBody()); } }