开发者

reading data from response

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜