The session is actually a server-side item, and how it is kept track of is via Cookies. IN the C# environment, you would attach a
CookieContainer
to the request to let the server know you accept cookies
var request = (HttpWebRequest)WebRequest.Create(uri);
request.CookieContainer = new CookieContainer();
And then when you do get the response, there will be a
Cookies
property which will be a collection of all the cookies that were sent.
var response = (HttpWebResponse) request.GetResponse()
Save the cookies, and add them back in when you make followup requests
References:
HttpWebRequest.CookieContainer Property (System.Net) | Microsoft Docs[
^]
HttpWebResponse.Cookies Property (System.Net) | Microsoft Docs[
^]