Cannot get cookies in wp7 using HttpWebRequest

后端 未结 1 1662
萌比男神i
萌比男神i 2020-12-21 19:04

I\'m trying to save cookies in a post request. Here is my code :

        CookieContainer myCookieContainer = new CookieContainer();
        HttpWebRequest my         


        
1条回答
  •  佛祖请我去吃肉
    2020-12-21 19:12

    Your code seems to be perfect, if the server sends you back any cookies you should see them in rep.Cookies, as well as in myCookieContainer.

    If you want to be sure use Fiddler or Wireshark to analyze the HTTP network traffic and look for the cookies, but if I'm right you won't find them. In this case my idea is to analyze the network traffic doing the same request with your browser, maybe the php/asp.net/other app decided not to set cookies due to some missing request headers.

    0 讨论(0)
提交回复
热议问题