HttpWebRequest request = WebRequest.Create("https://www.google.com/accounts/o8/id") as HttpWebRequest;
request .Accept = "application/xrds+xml";
Htt开发者_JAVA百科pWebResponse response = (HttpWebResponse)request .GetResponse();
returns xrds document. how to read that document.
Depends what you're trying to do - if you just need to read what comes back, then you could load the document into an XmlDocument and examine it programmatically e.g.
XmlDocument rdsDocument;
HttpWebRequest request = WebRequest.Create("https://www.google.com/accounts/o8/id") as HttpWebRequest;
request.Accept = "application/xrds+xml";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
rdsDocument = new XmlDocument();
rdsDocument.Load(response.GetResponseStream());
I think this is what what you're after
http://code.google.com/p/myspaceid-csharp-sdk/wiki/OpenStack
精彩评论