public function downloadPageHtml($pageId, $isRetry = false)
    {

        if (is_null($this->login->apiKey)) {
            $this->login->apiKey = $this->login->getApiKey();
        }

        $response = $this->getSinglePageDownloadUrl($pageId);

        if ($response['error']) {
            return $response;
        }

        $responseArray = json_decode($response['response'], true);
        $url = $responseArray['url'];

        if ($isRetry) {
            $url = str_replace('https:', 'http:', $url);
        }

        $options = [
            'verify' => !$isRetry ? $this->certFile : false,
        ];

        foreach ($_COOKIE as $index => $value) {
            if (strpos($index, 'splitTestV2URI') !== false) {
                $options['cookies'] = [$index => $value];
            }
        }

        try {
            $html = $this->client->get($url, $options);
            $response = [
                'code' => 200,
                'response' => $html->getBody()->getContents(),
            ];

            if (count($this->getPageSplitTestCookie($html)) > 0) {
                $response['splitTestCookie'] = $this->getPageSplitTestCookie($html);
            }

        } catch (ClientException $e) {
            $response = $this->parseException($e);

        } catch (RequestException $e) {
            $response = $this->parseException($e);
            if (!$isRetry) {
                $response = $this->downloadPageHtml($pageId, true);
            }

        } catch (ServerException $e) {
            $response = $this->parseException($e);

        } catch (ConnectException $e) {
            $message = 'Can not connect to Leadpages Server:';
            $response = $this->parseException($e, $message);

        }

        return $response;
    }