當前位置: 首頁>>代碼示例>>Python>>正文


Python Request.__init__方法代碼示例

本文整理匯總了Python中twisted.web.http.Request.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Request.__init__方法的具體用法?Python Request.__init__怎麽用?Python Request.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在twisted.web.http.Request的用法示例。


在下文中一共展示了Request.__init__方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from twisted.web.http import Request [as 別名]
# 或者: from twisted.web.http.Request import __init__ [as 別名]
def __init__(self, host, port, path, reactor=reactor):
        """
        @param host: the host of the web server to proxy.
        @type host: C{str}

        @param port: the port of the web server to proxy.
        @type port: C{port}

        @param path: the base path to fetch data from. Note that you shouldn't
            put any trailing slashes in it, it will be added automatically in
            request. For example, if you put B{/foo}, a request on B{/bar} will
            be proxied to B{/foo/bar}.  Any required encoding of special
            characters (such as " " or "/") should have been done already.

        @type path: C{str}
        """
        Resource.__init__(self)
        self.host = host
        self.port = port
        self.path = path
        self.reactor = reactor 
開發者ID:squeaky-pl,項目名稱:zenchmarks,代碼行數:23,代碼來源:proxy.py

示例2: __init__

# 需要導入模塊: from twisted.web.http import Request [as 別名]
# 或者: from twisted.web.http.Request import __init__ [as 別名]
def __init__(self, channel, queued, reactor=reactor):
        Request.__init__(self, channel, queued)
        self.reactor       = reactor
        self.urlMonitor    = URLMonitor.getInstance()
        self.cookieCleaner = CookieCleaner.getInstance()
        self.dnsCache      = DnsCache.getInstance()
#        self.uniqueId      = random.randint(0, 10000) 
開發者ID:adde88,項目名稱:hostapd-mana,代碼行數:9,代碼來源:ClientRequest.py

示例3: __init__

# 需要導入模塊: from twisted.web.http import Request [as 別名]
# 或者: from twisted.web.http.Request import __init__ [as 別名]
def __init__(self, channel, queued, reactor=reactor):
        Request.__init__(self, channel, queued)
        self.reactor       = reactor
        self.urlMonitor    = URLMonitor.getInstance()
        self.cookieCleaner = CookieCleaner.getInstance()
        self.dnsCache      = DnsCache.getInstance()
        #self.uniqueId      = random.randint(0, 10000) 
開發者ID:dropnz,項目名稱:mitmfnz,代碼行數:9,代碼來源:ClientRequest.py

示例4: __init__

# 需要導入模塊: from twisted.web.http import Request [as 別名]
# 或者: from twisted.web.http.Request import __init__ [as 別名]
def __init__(self, channel, queued, reactor=reactor):
        Request.__init__(self, channel, queued)
        self.reactor       = reactor
        self.urlMonitor    = URLMonitor.getInstance()
        self.hsts          = URLMonitor.getInstance().hsts
        self.cookieCleaner = CookieCleaner.getInstance()
        self.dnsCache      = DnsCache.getInstance()
        #self.uniqueId      = random.randint(0, 10000)
        
        #Use are own DNS server instead of reactor.resolve()
        self.customResolver = dns.resolver.Resolver()    
        self.customResolver.nameservers  = ['127.0.0.1'] 
開發者ID:dropnz,項目名稱:mitmfnz,代碼行數:14,代碼來源:ClientRequest.py

示例5: __init__

# 需要導入模塊: from twisted.web.http import Request [as 別名]
# 或者: from twisted.web.http.Request import __init__ [as 別名]
def __init__(self, channel, queued, reactor=reactor):
        Request.__init__(self, channel, queued)
        self.reactor       = reactor
        self.urlMonitor    = URLMonitor.getInstance()
        self.hsts          = URLMonitor.getInstance().isHstsBypass()
        self.cookieCleaner = CookieCleaner.getInstance()
        self.dnsCache      = DnsCache.getInstance()
        self.plugins       = ProxyPlugins.getInstance()
        #self.uniqueId      = random.randint(0, 10000) 
開發者ID:ahmadnourallah,項目名稱:SEF,代碼行數:11,代碼來源:ClientRequest.py


注:本文中的twisted.web.http.Request.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。