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 }
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)
def __init__(self, config): if not have_twisted: raise ImportError('Twisted required for TwistedTransport') TransportBase.__init__(self, config, self.__module__) self.agent = Agent(reactor)
def __init__(self, config): TransportBase.__init__(self, config, self.__module__)