Exemplo n.º 1
0
    def __init__(self):
        BaseHttp.__init__(self)
#         self.host = '101uccenter.beta.web.sdp.101.com'
        self.host = 'ucbetapi.101.com'
        self.port = ''
        self.http_obj = cofHttp.HttpCurl(self.host, ssl = True)
        header = [
            "Accept: application/json",
            "Content-Type: application/json"
        ]
        self.http_obj.set_header(header)
Exemplo n.º 2
0
    def __init__(self):
        BaseHttp.__init__(self)
        self.host = self.get_host()
        self.port = self.get_port()
        self.http_obj = cofHttp.HttpCurl(self.host, self.port)
        authorization = "MAC id=\"child_mental_health-\",nonce=\"1\",mac=\"1\""

        self.header = [
            "Accept:application/json",
            "Authorization:" + authorization
        ]
        self.http_obj.set_header(self.header)