def _patch(self, opt={}):
        """ private function to patch this request. This function
        could be called before/after preparation.

        :param dict opt: options, used options would be popped. Refer to Request.opt_* for details.
        """
        opt_netloc = opt.pop(Request.opt_url_netloc, None)
        opt_scheme = opt.pop(Request.opt_url_scheme, None)
        if opt_netloc or opt_scheme:
            scheme, netloc, path, params, query, fragment = six.moves.urllib.parse.urlparse(self.__url)
            self.__url = six.moves.urllib.parse.urlunparse((
                opt_scheme or scheme,
                opt_netloc or netloc,
                path,
                params,
                query,
                fragment
            ))

            logger.info('patching url: [{0}]'.format(self.__url))