def __init__(self, uri):
        """
        Create a fake Urllib2 request.

        @param uri: Request URI.
        @type uri: L{bytes}
        """
        self.uri = nativeString(uri)
        self.headers = Headers()

        _uri = URI.fromBytes(uri)
        self.type = nativeString(_uri.scheme)
        self.host = nativeString(_uri.host)

        if (_uri.scheme, _uri.port) not in ((b'http', 80), (b'https', 443)):
            # If it's not a schema on the regular port, add the port.
            self.host += ":" + str(_uri.port)

        if _PY3:
            self.origin_req_host = nativeString(_uri.host)
            self.unverifiable = lambda _: False

        Create a fake Urllib2 request.

        @param uri: Request URI.
        @type uri: L{bytes}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/client.py