public static void Main()
Console.WriteLine("Hello World");
CookieContainer cookieContainer = new CookieContainer();
HttpClientHandler handler = new HttpClientHandler { CookieContainer = cookieContainer };
handler.CookieContainer.Add(new Uri(@"https://www.google.com"), new Cookie("test", null));
using (HttpClient client = new HttpClient(handler) { BaseAddress = new Uri(@"https://www.google.com") })
client.DefaultRequestHeaders.Add("Referer", referer??"");