开发者

reading data from response

开发者 https://www.devze.com 2023-01-08 06:13 出处:网络
HttpWebRequest request = WebRequest.Create(\"https://www.google.com/accounts/o8/id\") as HttpWebRequest;
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

精彩评论

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