def _http_check_json(self, response):
        try:
            data = json.loads(response.data.decode('utf-8'))
        except ValueError:
            return self._http_check(response)

        if response.status != 200:
            status_txt = data.get('status_txt', 'http error')
            raise NSQHttpError('%s <%s>' % (status_txt, response.status))

        return data['data']
dataset/ETHPy150Open wtolson/gnsq/gnsq/httpclient.py/HTTPClient._http_check_json/original