public function data() : string
    {
        $code = $this->response->getStatusCode();

        if ($code >= 400 && $code < 600) {
            throw new ErrorResponseException($this->response->getReasonPhrase(), $code);
        }

        return $this->payload();
    }
public function data() : string
    {
        $code = $this->response->getStatusCode();

        if ($code >= 400 && $code < 600) {
            throw new ErrorResponseException($this->response->getReasonPhrase(), $code);
        }

        return $this->payload();
    }
public function data ( ) : string { $ code = $ this -> response -> getStatusCode ( ) ; if ( $ code >= 400 && $ code < 600 ) { throw new ErrorResponseException ( $ this -> response -> getReasonPhrase ( ) , $ code ) ; } return $ this -> payload ( ) ; }
parsed data with status checking
@return string
@throws ErrorResponseException
parsed data with status checking