HttpWebRequest request = WebRequest.Create("http://google.com") as HttpWebRequest;
request.Accept = "application/xrds+xml";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
WebHeaderCollection header = response.Headers;
Here google returns text. How to read it?
Your
"application/xrds+xml"was giving me issues, I was receiving a Content-Length of 0 (no response).After removing that, you can access the response using
response.GetResponseStream().