public function isSuccess()
    {
        $statuscode = $this->response->getStatusCode();

        if(!in_array($statuscode, [200, 204], true))
        {
            throw new Exception('HTTP Code ' . $statuscode . ' ' . $this->response->getBody());
        }

        return true;
    }
public function isSuccess()
    {
        $statuscode = $this->response->getStatusCode();

        if(!in_array($statuscode, [200, 204], true))
        {
            throw new Exception('HTTP Code ' . $statuscode . ' ' . $this->response->getBody());
        }

        return true;
    }
public function isSuccess ( ) { $ statuscode = $ this -> response -> getStatusCode ( ) ; if ( ! in_array ( $ statuscode , [ 200 , 204 ] , true ) ) { throw new Exception ( 'HTTP Code ' . $ statuscode . ' ' . $ this -> response -> getBody ( ) ) ; } return true ; }
Should return if sending the data was successful

@return bool
@throws Exception
Should return if sending the data was successful