In which format does HttpRequestHeader.Cookies need to be specified? F.e, if I want to add cookie named CITY with value NY how should I do that with WebClient.Headers.Add() method?
Try this sample
WebClient wb = new WebClient(); wb.Headers.Add(HttpRequestHeader.Cookie, "CITY=NY");
For many cookies:
wb.Headers.Add(HttpRequestHeader.Cookie, "cookiename1=cookievalue1; cookiename2=cookievalue2");
1.4m articles
1.4m replys
5 comments
57.0k users