protected function processResponse(ResponseInterface $response)
    {
        if (200 !== $response->getStatusCode()) {
            throw new IcoBenchException(
                sprintf('IcoBench replied with non-success status (%s)', $response->getStatusCode())
            );
        }

        $data = json_decode($response->getBody(), true);

        if (isset($data['error'])) {
            throw new IcoBenchException($data['error']);
        }

        if (isset($data['message'])) {
            return $data['message'];
        }

        return $data;
    }
protected function processResponse(ResponseInterface $response)
    {
        if (200 !== $response->getStatusCode()) {
            throw new IcoBenchException(
                sprintf('IcoBench replied with non-success status (%s)', $response->getStatusCode())
            );
        }

        $data = json_decode($response->getBody(), true);

        if (isset($data['error'])) {
            throw new IcoBenchException($data['error']);
        }

        if (isset($data['message'])) {
            return $data['message'];
        }

        return $data;
    }
protected function processResponse ( ResponseInterface $ response ) { if ( 200 !== $ response -> getStatusCode ( ) ) { throw new IcoBenchException ( sprintf ( 'IcoBench replied with non-success status (%s)' , $ response -> getStatusCode ( ) ) ) ; } $ data = json_decode ( $ response -> getBody ( ) , true ) ; if ( isset ( $ data [ 'error' ] ) ) { throw new IcoBenchException ( $ data [ 'error' ] ) ; } if ( isset ( $ data [ 'message' ] ) ) { return $ data [ 'message' ] ; } return $ data ; }
Get data from response

@param ResponseInterface $response
@return array | string

@throws IcoBenchException
Get data from response