def _ingest_response(self, response):
        self.response = response
        if self._can_parse(response.headers['Content-Type']):
            hal_json = self._parse_content(response.text)
        else:
            raise exc.HALNavigatorError(
                message="Unexpected content type! Wanted {0}, got {1}"
                .format(self.headers.get('Accept', self.DEFAULT_CONTENT_TYPE),
                        self.response.headers['content-type']),
                nav=self,
                status=self.response.status_code,
                response=self.response,
            )
        self._links = self._make_links_from(hal_json)
        self._embedded = self._make_embedded_from(hal_json)
        # Set properties from new document's self link
        self._update_self_link(
            hal_json.get('_links', {}).get('self', {}),
            response.headers,
        )
        # Set curies if available
        self.curies = dict(
            (curie['name'], curie['href'])
            for curie in
            hal_json.get('_links', {}).get('curies', []))
        # Set state by removing HAL attributes
        self.state = utils.getstate(hal_json)
Create a Skeleton AddOn (needs internet connection to github)
dataset/ETHPy150Open deontologician/restnavigator/restnavigator/halnav.py/HALNavigatorBase._ingest_response--crossover with--dataset/ETHPy150Open dpgaspar/Flask-AppBuilder/flask_appbuilder/console.py/create_addon