You must use Fiddler to grab the request you want to simulate. You need to look at inspectors> raw materials. This is an example of a request to the chrome fiddler site
GET http://fiddler2.com/ HTTP/1.1 Host: fiddler2.com Connection: keep-alive Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36 Referer: https://www.google.be/ Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8,nl;q=0.6
You can then set each of these headers in your web request (see http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx ).
WebRequest request = (HttpWebRequest)WebRequest.Create("http://www.test.com"); request.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36";
source share