Created
January 6, 2015 14:52
-
-
Save tankcdr/baa9b9477027a2a2c737 to your computer and use it in GitHub Desktop.
AskQuestion-Receiving the response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
WebResponse qaResponse = qaCall.GetResponse(); | |
Stream requestStream = qaResponse.GetResponseStream(); | |
StreamReader responseReader = new StreamReader(requestStream); | |
answers = responseReader.ReadToEnd(); | |
responseReader.Close(); | |
} | |
catch (System.Net.WebException e) | |
{ | |
Console.Out.WriteLine("errors:" + e.Message); | |
Console.ReadKey(); | |
} | |
catch (Exception e) | |
{ | |
Console.Out.WriteLine("error:" + e.Message); | |
Console.ReadKey(); | |
} | |
return answers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment