protected function zipResponse()
    {
        $release = $this->latestSparkRelease();

        try {
            return (string) (new HttpClient)->get(
                $this->sparkUrl.'/api/releases/'.$release.'/download?api_token='.$this->readToken(),
                [
                    'headers' => [
                        'X-Requested-With' => 'XMLHttpRequest',
                    ],
                    'verify' => __DIR__.'/../cacert.pem',
                ]
            )->getBody();
        } catch (ClientException $e) {
            if ($e->getResponse()->getStatusCode() === 401) {
                $this->invalidLicense($release);
            }

            throw $e;
        }
    }
protected function zipResponse()
    {
        $release = $this->latestSparkRelease();

        try {
            return (string) (new HttpClient)->get(
                $this->sparkUrl.'/api/releases/'.$release.'/download?api_token='.$this->readToken(),
                [
                    'headers' => [
                        'X-Requested-With' => 'XMLHttpRequest',
                    ],
                    'verify' => __DIR__.'/../cacert.pem',
                ]
            )->getBody();
        } catch (ClientException $e) {
            if ($e->getResponse()->getStatusCode() === 401) {
                $this->invalidLicense($release);
            }

            throw $e;
        }
    }
protected function zipResponse ( ) { $ release = $ this -> latestSparkRelease ( ) ; try { return ( string ) ( new HttpClient ) -> get ( $ this -> sparkUrl . '/api/releases/' . $ release . '/download?api_token=' . $ this -> readToken ( ) , [ 'headers' => [ 'X-Requested-With' => 'XMLHttpRequest' , ] , 'verify' => __DIR__ . '/../cacert.pem' , ] ) -> getBody ( ) ; } catch ( ClientException $ e ) { if ( $ e -> getResponse ( ) -> getStatusCode ( ) === 401 ) { $ this -> invalidLicense ( $ release ) ; } throw $ e ; } }
Get the raw Zip response for a Spark download.

@return string
Get the raw Zip response for a Spark download .