private function request($url, array $options)
    {
        $response = $this->client->request('POST', $url, $options);

        $body = $response->getBody();
        if ($response->getStatusCode() != 200
                || !isset($body)) {
            throw new \Exception('Failed request to ' . $this->endpoint . '.');
        }

        return $response;
    }
private function request($url, array $options)
    {
        $response = $this->client->request('POST', $url, $options);

        $body = $response->getBody();
        if ($response->getStatusCode() != 200
                || !isset($body)) {
            throw new \Exception('Failed request to ' . $this->endpoint . '.');
        }

        return $response;
    }
private function request ( $ url , array $ options ) { $ response = $ this -> client -> request ( 'POST' , $ url , $ options ) ; $ body = $ response -> getBody ( ) ; if ( $ response -> getStatusCode ( ) != 200 || ! isset ( $ body ) ) { throw new \ Exception ( 'Failed request to ' . $ this -> endpoint . '.' ) ; } return $ response ; }
Requires a cookie authentication session

@param string $url Endpoint for obtaining AuthSession
@param array $options Request options

@return \Psr\Http\Message\ResponseInterface
@throws \Exception If failed request
Requires a cookie authentication session