def __init__(self, services={}, authenticator=None, expose_request=False, preprocessor=None, debug=None, strict=False): """ @raise TypeError: C{dict} type is required for C{services}. """ self.logger = logging.instance_logger(self) self.services = ServiceCollection() self.authenticator = authenticator self.preprocessor = preprocessor self.expose_request = expose_request self.strict = strict if debug is not None: self.debug = debug if not hasattr(services, 'iteritems'): raise TypeError("dict type required for services") for name, service in services.iteritems(): self.addService(service, name)
def __init__(self, url, amf_version=pyamf.AMF0, client_type=DEFAULT_CLIENT_TYPE): self.logger = logging.instance_logger(self) self.original_url = url self.requests = [] self.request_number = 1 self.amf_version = amf_version self.client_type = client_type self.headers = remoting.HeaderCollection() self._setUrl(url)
def __init__(self, services={}, authenticator=None, expose_request=False, preprocessor=None, debug=None): self.logger = logging.instance_logger(self) self.services = ServiceCollection() self.authenticator = authenticator self.preprocessor = preprocessor self.expose_request = expose_request if debug is not None: self.debug = debug if not hasattr(services, 'iteritems'): raise TypeError, "dict type required for services" for name, service in services.iteritems(): self.addService(service, name)
def __init__(self, url, amf_version=pyamf.AMF0, client_type=DEFAULT_CLIENT_TYPE, referer=None, user_agent=DEFAULT_USER_AGENT, strict=False): self.logger = logging.instance_logger(self) self.original_url = url self.requests = [] self.request_number = 1 self.user_agent = user_agent self.referer = referer self.amf_version = amf_version self.client_type = client_type self.headers = remoting.HeaderCollection() self.http_headers = {} self.strict = strict self._setUrl(url)