Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# webrequest cookies

     CookieContainer cookieContainer = new CookieContainer();
                            System.Net.Cookie userNameCookie = new System.Net.Cookie("user", "username");
                            System.Net.Cookie passwordCookie = new System.Net.Cookie("password", "9848jf7s7ejhd");
                            cookieContainer.Add(userNameCookie);
                            cookieContainer.Add(passwordCookie);

                            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(produkt);
                            request.CookieContainer = cookieContainer;
                         //multiple cookies.
 
PREVIOUS NEXT
Tagged: #webrequest #cookies
ADD COMMENT
Topic
Name
6+2 =