'Handle a request for a qute: scheme.
This method must be reimplemented by all custom URL scheme handlers.
The request is asynchronous and does not need to be handled right away.
Args:
job: QWebEngineUrlRequestJob'

def requestStarted(self, job):

    url = job.requestUrl()
    assert (job.requestMethod() == 'GET')
    assert (url.scheme() == 'qute')
    log.misc.debug('Got    request    for    {}'.format(url.toDisplayString()))
    try:
        (mimetype, data) = qutescheme.data_for_url(url)
    except qutescheme.NoHandlerFound:
        log.misc.debug('No    handler    found    for    {}'.format(url.toDisplayString()))
        job.fail(QWebEngineUrlRequestJob.UrlNotFound)
    except qutescheme.QuteSchemeOSError:
        log.misc.exception('OSError    while    handling    qute://*    URL')
        job.fail(QWebEngineUrlRequestJob.UrlNotFound)
    except qutescheme.QuteSchemeError:
        log.misc.exception('Error    while    handling    qute://*    URL')
        job.fail(QWebEngineUrlRequestJob.RequestFailed)
    except qutescheme.Redirect as e:
        qtutils.ensure_valid(e.url)
        job.redirect(e.url)
    else:
        log.misc.debug('Returning    {}    data'.format(mimetype))
        buf = QBuffer(parent=self)
        buf.open(QIODevice.WriteOnly)
        buf.write(data)
        buf.seek(0)
        buf.close()
        job.reply(mimetype.encode('ascii'), buf)
