Takes a response object and ingests state, links, embedded
        documents and updates the self link of this navigator to
        correspond. This will only work if the response is valid
        JSON

def _ingest_response(self, response):
        '''Takes a response object and ingests state, links, embedded
        documents and updates the self link of this navigator to
        correspond. This will only work if the response is valid
        JSON
        '''
        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)