def METHOD_NAME(self, scheme, handler, threaded=False, encoding="UTF-8"):
    """Registers a simple callable as the handler for the given scheme.
    The handler only gets a GET URL (QUrl) and should return a HTML string.
    If threaded is True, the handler is called in a background thread.
    The encoding defaults to UTF-8 and is used for encoding the HTML returned
    by then handler and also set in the Content-Type header.
    """
    cls = ThreadedHtmlReply if threaded else HtmlReply
    def createRequest(mgr, operation, request, data):
        return cls(mgr, request.url(), handler, encoding)
    self._dispatcher[scheme] = createRequest