Ejemplo n.º 1
0
 def __init__(self,
              host="",
              url="/",
              method="GET",
              headers={},
              protocol="https",
              body=None,
              port=443,
              key_file=None,
              cert_file=None,
              timeout=None):
     HttpRequest.__init__(self,
                          host=host,
                          url=url,
                          method=method,
                          body=body,
                          headers=headers)
     self.__ssl_enable = False
     if protocol is "https":
         self.__ssl_enable = True
     self.__key_file = key_file
     self.__cert_file = cert_file
     self.__port = port
     self.__connection = None
     self._timeout = timeout
Ejemplo n.º 2
0
 def __init__(
         self,
         host="",
         url="/",
         method="GET",
         headers={},
         protocol=PT.HTTP,
         content=None,
         port=None,
         key_file=None,
         cert_file=None,
         timeout=None):
     HttpRequest.__init__(
         self,
         host=host,
         url=url,
         method=method,
         headers=headers)
     self.__ssl_enable = False
     if protocol is PT.HTTPS:
         self.__ssl_enable = True
     self.__key_file = key_file
     self.__cert_file = cert_file
     self.__port = port
     self.__connection = None
     self._timeout = timeout
     self.set_body(content)
	def __init__(self,host="",url="/",method="GET",headers={},protocol=PT.HTTP,port=None,key_file=None,cert_file=None):
		HttpRequest.__init__(self,host=host,url=url,method=method,headers=headers)
		self.__ssl_enable=False
		if protocol is PT.HTTPS:
			self.__ssl_enable=True
		self.__key_file=key_file
		self.__cert_file=cert_file
		self.__port=port
		self.__connection=None
Ejemplo n.º 4
0
 def __init__(self, uri, port):
     self.rule_engine_uri = uri
     self.rule_engine_port = port
     HttpRequest.__init__(self, uri + ':' + port)