filestack/mixins/CommonMixin.php
protected function handleResponseDecodeJson($response)
    {
        $status_code = $response->getStatusCode();
        if ($status_code !== 200) {
            throw new FilestackException($response->getBody(), $status_code);
        }

        $json_response = json_decode($response->getBody(), true);
        return $json_response;
    }
protected function handleResponseDecodeJson($response)
    {
        $status_code = $response->getStatusCode();
        if ($status_code !== 200) {
            throw new FilestackException($response->getBody(), $status_code);
        }

        $json_response = json_decode($response->getBody(), true);
        return $json_response;
    }
protected function handleResponseDecodeJson ( $ response ) { $ status_code = $ response -> getStatusCode ( ) ; if ( $ status_code !== 200 ) { throw new FilestackException ( $ response -> getBody ( ) , $ status_code ) ; } $ json_response = json_decode ( $ response -> getBody ( ) , true ) ; return $ json_response ; }
Handles a response.  decode and return json if 200,
throws exception otherwise.

@param Response  $response   the response object

@throws FilestackException   if statuscode is not OK

@return array (decoded json)
Handles a response . decode and return json if 200 throws exception otherwise .