Skip to content

Instantly share code, notes, and snippets.

@tankcdr
Created January 6, 2015 14:52
Show Gist options
  • Save tankcdr/baa9b9477027a2a2c737 to your computer and use it in GitHub Desktop.
Save tankcdr/baa9b9477027a2a2c737 to your computer and use it in GitHub Desktop.
AskQuestion-Receiving the response
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