title: C# read from HttpResponseMessage
body: <p>I am using .net's Httpclient for the first time and finding it very hard. I have managed to call the server and receive response from it but stuck at reading from the response. Here is my code:</p>
  
  <pre><code>if (Method == HttpVerb.POST)
       response = client.PostAsync(domain, new StringContent(parameters)).Result;
  else
       response = client.GetAsync(domain).Result;
  
  if (response != null)
  {
       var responseValue = string.Empty;
  
       Task task = response.Content.ReadAsStreamAsync().ContinueWith(t =&gt;
       {
           var stream = t.Result;
           using (var reader = new StreamReader(stream))
           {
               responseValue = reader.ReadToEnd();
           }
       });
  
  
       return responseValue;
  }
  </code></pre>
  
  <p>responseValue has {} in it although the service is returning data. How should I fix the issue?</p>
  
  <p>The project is in .Net 4.</p>