示例#1
0
 def __init__(self, config):
     if not have_requests:
         raise ImportError('requests module required for RequestsTransport')
     TransportBase.__init__(self, config, self.__module__)
     self.REQ_MAP = {
         'GET': requests.get,
         'POST': requests.post,
         'DELETE': requests.delete,
         'PUT': requests.put
     }
示例#2
0
 def __init__(self, config):
     if not have_requests:
         raise ImportError('requests module required for RequestsTransport')
     TransportBase.__init__(self, config, self.__module__)
     self.REQ_MAP = {
         'GET': requests.get,
         'POST': requests.post,
         'DELETE': requests.delete,
         'PUT': requests.put
     }
示例#3
0
    def __init__(self, config):
        if not have_twisted:
            raise ImportError('Twisted required for TwistedTransport')
        TransportBase.__init__(self, config, self.__module__)

        if config.get("ignore-ssl-errors"):
            policy = NoValidationPolicy()
        else:
            policy = BrowserLikePolicyForHTTPS()

        self.agent = Agent(reactor, policy)
示例#4
0
 def __init__(self, config):
     if not have_twisted:
         raise ImportError('Twisted required for TwistedTransport')
     TransportBase.__init__(self, config, self.__module__)
     self.agent = Agent(reactor)
示例#5
0
 def __init__(self, config):
     TransportBase.__init__(self, config, self.__module__)
示例#6
0
 def __init__(self, config):
     TransportBase.__init__(self, config, self.__module__)
示例#7
0
 def __init__(self, config):
     if not have_twisted:
         raise ImportError('Twisted required for TwistedTransport')
     TransportBase.__init__(self, config, self.__module__)
     self.agent = Agent(reactor)