3
Windows Phone의 HttpWebResponse 헤더에서 HttpOnly 쿠키를 읽을 수있는 방법이 있습니까?"설정 - 쿠키"아래에있는 내 코드에서Windows Phone의 HttpWebResponse 헤더에서 HttpOnly 쿠키 읽기
는
HttpWebRequest webRequest = (HttpWebRequest)asynchronousResult.AsyncState;
// End the get response operation
using (HttpWebResponse response = (HttpWebResponse)webRequest.EndGetResponse(asynchronousResult))
{
Stream streamResponse = response.GetResponseStream();
// But Set-Cookie is not present here as its HttpOnly
var cookies = response.Cookies["Set-Cookie"];
using (StreamReader streamReader = new StreamReader(streamResponse))
{
String Response = streamReader.ReadToEnd();
streamResponse.Close();
streamReader.Close();
response.Close();
// Call the response callback
if (Callback != null)
{
Callback(this, new EventArgs1() { Response = Response, Cookie = cookies });
}
}
}