public function decodeContent()
    {
        $this->decodedContent =
            json_decode($this->content, true)?
                :["error"=>$this->content];

        if (!$this->ok()) {
            $this->makeException();
        }
    }
public function decodeContent()
    {
        $this->decodedContent =
            json_decode($this->content, true)?
                :["error"=>$this->content];

        if (!$this->ok()) {
            $this->makeException();
        }
    }
public function decodeContent ( ) { $ this -> decodedContent = json_decode ( $ this -> content , true ) ? : [ "error" => $ this -> content ] ; if ( ! $ this -> ok ( ) ) { $ this -> makeException ( ) ; } }
Decodes the JSON and then checks if the response is 2xx,
accordingly creates an exception
Decodes the JSON and then checks if the response is 2xx accordingly creates an exception