My favorites | Sign in
Project Home Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System;
using System.Net;

namespace AdamDotCom.Common.Service.Utilities
{
public class WebClientWithCookies : WebClient
{
private readonly CookieContainer m_container = new CookieContainer();

protected override WebRequest GetWebRequest(Uri address)
{
var request = base.GetWebRequest(address);
if (request is HttpWebRequest)
{
(request as HttpWebRequest).CookieContainer = m_container;
}
return request;
}
}
}

Change log

r23 by kahtava on Sep 29, 2009   Diff
Added WebClientWithCookies to Common
assembly.
Go to: 
Sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 559 bytes, 20 lines
Powered by Google Project Hosting