C# overwrite Existing Cookie in CookieContainer? -


I request a page with HTTPWebRequest and I am using this code Add cookie

  agent.cookieJar.Add (new urie ("http://www.website.com"), new cookie ("Brokers", "Harta and Brubber & amp; = - "));   

I ended up with the same two cookies in each of them with different values ​​since the request is that Javascript cookies have been sent back. Which function should I use to overwrite / update the "brbr" cookie when I need it?

Their overwrite is available in the C # HttpCookie clas but you can overwrite the value of cookies like That you want to do as shown below

  request Cookies ["brbr"] = "some new value"; Or answer this. Cookies ["brbar"] = "some new value";    

Comments