Python newbie here!
I have written the below code in c#, I would like to achieve the same functionality in python.
string serviceURL = "https://someurl";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(serviceURL);
request.Method = "GET";
string path = @"C:\mycert.cer";
X509Certificate Cert = X509Certificate.CreateFromCertFile(path);
Logger.Error(path);
request.ClientCertificates.Add(Cert);
HttpWebResponse WebResp = request.GetResponse() as HttpWebResponse;
var encoding = ASCIIEncoding.ASCII;
string responseText;
StreamReader reader = new System.IO.StreamReader(WebResp.GetResponseStream(), encoding);
using (reader = new System.IO.StreamReader(WebResp.GetResponseStream(), encoding))
{
responseText = reader.ReadToEnd();
}
I did some search on google, but could not find any fitting examples.