Phase REST XML into variable
- by 001
I want to get a response from the REST XML web service, and phase it into variables so I can use them in my program.
1) How come this code does not work? I get an empty string...
// Get response
string ws_response="";
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
// Get the response stream
StreamReader reader = new StreamReader(response.GetResponseStream());
// web service response string
ws_response = reader.ReadToEnd; // <---???? I get an empty string
// do phasing here (ie XML element into variable) etc..
//
}