(self, url, response, content)
Adds the content of this HTTP response and message body to this
        `RemoteObject` instance.

        Use `update_from_response()` only when you would use
        `DataObject.update_from_dict()`: when decoding outside content (in
        this case an HTTP response) into an existing `RemoteObject` instance.

        If the response is not a successful response from which the
        `RemoteObject` instance can be updated, an appropriate exception will
        be raised (as determined by the instance's `raise_from_response()`
        method).

        If the response includes a new location URL in the appropriate header
        (depending on the response status), the location of the `RemoteObject`
        instance is updated as well.
Adds the content of this HTTP response and message body to this
        `RemoteObject` instance.
Adds the content of this HTTP response and message body to this RemoteObject instance .
def update_from_response(self, url, response, content):
        """Adds the content of this HTTP response and message body to this
        `RemoteObject` instance.

        Use `update_from_response()` only when you would use
        `DataObject.update_from_dict()`: when decoding outside content (in
        this case an HTTP response) into an existing `RemoteObject` instance.

        If the response is not a successful response from which the
        `RemoteObject` instance can be updated, an appropriate exception will
        be raised (as determined by the instance's `raise_from_response()`
        method).

        If the response includes a new location URL in the appropriate header
        (depending on the response status), the location of the `RemoteObject`
        instance is updated as well.

        """
        self.raise_for_response(url, response, content)

        if self.response_has_content.get(response.status):
            try:
                data = json.loads(content)
            except UnicodeDecodeError:
                data = json.loads(content, cls=ForgivingDecoder)

            self.update_from_dict(data)

        location_header = self.location_headers.get(response.status)
        if location_header is None:
            self._location = url
        elif self.location_header_required.get(response.status):
            self._location = response[location_header.lower()]
        else:
            self._location = response.get(location_header.lower(), url)

        if 'etag' in response:
            self._etag = response['etag']
def update_from_response ( self , url , response , content ) : self . raise_for_response ( url , response , content ) if self . response_has_content . get ( response . status ) : try : data = json . loads ( content ) except UnicodeDecodeError : data = json . loads ( content , cls = ForgivingDecoder ) self . update_from_dict ( data ) location_header = self . location_headers . get ( response . status ) if location_header is None : self . _location = url elif self . location_header_required . get ( response . status ) : self . _location = response [ location_header . lower ( ) ] else : self . _location = response . get ( location_header . lower ( ) , url ) if 'etag' in response : self . _etag = response [ 'etag' ]