Мне нужно передать все свои файлы cookie текущей страницы на другой сервер с запросом:
string url = "http://www.someserver.com/page1.aspx";
// Create a request for the URL.
WebRequest request = WebRequest.Create(url);
// If required by the server, set the credentials.
request.Credentials = CredentialCache.DefaultCredentials;
// Get the response.
WebResponse response = request.GetResponse();
// Display the status.
//Console.WriteLine(((HttpWebResponse)response).StatusDescription);
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd();
// Display the content.
Console.WriteLine(responseFromServer);
// Clean up the streams and the response.
reader.Close();
response.Close();
Что я должен добавить к этому коду, чтобы прочитать текущие файлы cookie и передать их http://www.someserver.com/page1.aspx
Спасибо