def METHOD_NAME(self, request, message):
    status = message.get_property('status-code')
    if not 200 <= status < 400:
        request.cancel()
        return self.fail('Bad HTTP code {0}'.format(status))
    target = Gio.file_new_for_path(self.cover_path)
    flags = Gio.FileCreateFlags.NONE
    def replaced(cover_file, task, data):
        try:
            ostr = cover_file.replace_finish(task)
            request.provide_target(ostr)
            request.connect('receive-failure', self._receive_fail, target)
            request.receive()
        except GLib.GError:
            request.cancel()
            return self.fail('Cannot open cover file')
    target.replace_async(None, True, flags, GLib.PRIORITY_DEFAULT,
                         self.cancellable, replaced, None)