var client = new RestClient(Url.Combine(sharepointSiteUrl, "_api"));
client.CookieContainer = new CookieContainer();
client.CookieContainer.SetCookies(siteUri, cred.GetAuthenticationCookie(siteUri));
var digestReq = new RestRequest("contextinfo", Method.POST);
digestReq.AddHeader("Accept", "application/json");
var digest = client.Execute<dynamic>(digestReq).Data;
I am not familiar with C# POST
calls. I am trying to convert this code to Python and wanted to understand how to do it.
I tried looking up requests in Python but i do not understand how cookies work there and how to execute these calls.