protected function getRequest()
    {
        $url = $this->buildUrl($this->getBody());

        $response = $this->client->get($url, [
            'auth'    => $this->getAuth(),
            'headers' => [
                'Accept' => 'application/json',
            ],
        ]);

        if ($response->getStatusCode() != 201 && $response->getStatusCode() != 200) {
            throw new \Exception('Unable to request from API.');
        }

        return $response;
    }
protected function getRequest()
    {
        $url = $this->buildUrl($this->getBody());

        $response = $this->client->get($url, [
            'auth'    => $this->getAuth(),
            'headers' => [
                'Accept' => 'application/json',
            ],
        ]);

        if ($response->getStatusCode() != 201 && $response->getStatusCode() != 200) {
            throw new \Exception('Unable to request from API.');
        }

        return $response;
    }
protected function getRequest ( ) { $ url = $ this -> buildUrl ( $ this -> getBody ( ) ) ; $ response = $ this -> client -> get ( $ url , [ 'auth' => $ this -> getAuth ( ) , 'headers' => [ 'Accept' => 'application/json' , ] , ] ) ; if ( $ response -> getStatusCode ( ) != 201 && $ response -> getStatusCode ( ) != 200 ) { throw new \ Exception ( 'Unable to request from API.' ) ; } return $ response ; }
Creates and sends a GET request to the requested URL.

@throws \Exception

@return mixed
Creates and sends a GET request to the requested URL .