title: How to read data from response body with HTTPclient Get method?
body: <p>I have tried but dont know how to read data from API response. I was able to get 200 status code but I can't figure out how to get actualdata. I am trying to get data from Withings API (<a href="http://developer.withings.com/oauth2/#tag/measure%2Fpaths%2Fhttps%3A~1~1wbsapi.withings.net~1measure%3Faction%3Dgetmeas%2Fget" rel="nofollow noreferrer">http://developer.withings.com/oauth2/#tag/measure%2Fpaths%2Fhttps%3A~1~1wbsapi.withings.net~1measure%3Faction%3Dgetmeas%2Fget</a>)</p>
  
  <p>Below response i got:</p>
  
  <p>StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, OPTIONS Access-Control-Allow-Headers: Content-Type, * Date: Mon, 10 Jun 2019 11:51:03 GMT Server: Apache Content-Length: 65 Content-Type: text/plain; charset=UTF-8</p>
  
  <p>The following is my code:</p>
  
  <pre><code>        string accessToken = "my_accessToken";
          HttpClient  client = new HttpClient();
          var url = "https://wbsapi.withings.net/measure?action=getmeas&amp;meastype=1&amp;category=1&amp;startdate=737060&amp;enddate=737179&amp;offset=0";
          client.DefaultRequestHeaders.Add("Authorization", "Bearer " + accessToken);
          var response = await client.GetAsync(url);
          string content1 = await response.Content.ReadAsStringAsync();
          string content2 = response.Content.ReadAsStringAsync().Result;
  </code></pre>
  
  <p>Above i have added link for withings API. Is anyone guide how to get data from response body.</p>