'initialize the IWinHttpWebRequest Com Object.'

def __init__(self, host, cert_file, protocol, timeout):

    self.host = unicode(host)
    self.cert_file = cert_file
    self._httprequest = _WinHttpRequest()
    self.protocol = protocol.lower()
    self.timeout = timeout
    clsid = GUID('{2087C2F4-2CEF-4953-A8AB-66779B670495}')
    iid = GUID('{016FE2EC-B2C8-45F8-B23B-39E53A75396B}')
    _CoInitialize(None)
    _CoCreateInstance(byref(clsid), 0, 1, byref(iid), byref(self._httprequest))
