title: Get the API value from the JSON returned in a HttpResponseMessage
body: <p>I have created a Controller and method which i use to get data from an API.
  I use <code>HttpResponseMessage</code> to get the response. Everything works fine but i can not get the exact data i want in JSON format.<br>
  Method looks like below:</p>
  
  <pre><code>public class TestController : ApiController
      {
          [HttpGet]
  
          public async Task&lt;IHttpActionResult&gt; TestMethod(...)
          {
              string _apiUrl = String.Format("...");
              string _baseAddress = "...";
  
              using (var client = new HttpClient())
              {
                  client.BaseAddress = new Uri(_baseAddress);
                  client.DefaultRequestHeaders.Accept.Clear();
                  client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                  HttpResponseMessage response = await client.GetAsync(_apiUrl);
  
  
                  if (response.IsSuccessStatusCode)
                  {
                      return Json(response);
                  }
              }
              return NotFound();
          }
      }
  </code></pre>
  
  <p>The response i get looks like:</p>
  
  <pre><code>{
    "Version": {
      "Major": 1,
      "Minor": 1,
      "Build": -1,
      "Revision": -1,
      "MajorRevision": -1,
      "MinorRevision": -1
    },
    "Content": {
      "Headers": [
        {
          "Key": "Content-Length",
          "Value": [
            "359"
          ]
        },
        {
          "Key": "Content-Type",
          "Value": [
            "application/json; charset=utf-8"
          ]
        },
        {
          "Key": "Expires",
          "Value": [
            "-1"
          ]
        }
      ]
    },
    "StatusCode": 200,
    "ReasonPhrase": "OK",
    "Headers": [
      {
        "Key": "Pragma",
        "Value": [
          "no-cache"
        ]
      },
      {
        "Key": "X-SourceFiles",
        "Value": ["..."
        ]
      },
      {
        "Key": "Cache-Control",
        "Value": [
          "no-cache"
        ]
      },
      {
        "Key": "Date",
        "Value": [
          "Thu, 21 Jul 2016 13:25:54 GMT"
        ]
      },
      {
        "Key": "Server",
        "Value": [
          "Microsoft-IIS/10.0"
        ]
      },
      {
        "Key": "X-AspNet-Version",
        "Value": [
          "4.0.30319"
        ]
      },
      {
        "Key": "X-Powered-By",
        "Value": [
          "ASP.NET"
        ]
      }
    ],
    "RequestMessage": {
      "Version": {
        "Major": 1,
        "Minor": 1,
        "Build": -1,
        "Revision": -1,
        "MajorRevision": -1,
        "MinorRevision": -1
      },
      "Content": null,
      "Method": {
        "Method": "GET"
      },
      "RequestUri": "...",
      "Headers": [
        {
          "Key": "Accept",
          "Value": [
            "application/json"
          ]
        }
      ],
      "Properties": {}
    },
    "IsSuccessStatusCode": true
  }
  </code></pre>
  
  <p>But normaly, the API return this value (<code>xml</code> format):</p>
  
  <pre><code>&lt;License&gt;
    &lt;Existing&gt;
      &lt;Amount&gt;0&lt;/Amount&gt;
      &lt;Quantity&gt;0&lt;/Quantity&gt;
      &lt;UnitAmount&gt;0&lt;/UnitAmount&gt;
    &lt;/Existing&gt;
  &lt;New&gt;
     &lt;Amount&gt;400&lt;/Amount&gt;
     &lt;Quantity&gt;50&lt;/Quantity&gt;
     &lt;UnitAmount&gt;8&lt;/UnitAmount&gt;
  &lt;/New&gt;
  &lt;Result&gt;
     &lt;Amount&gt;400&lt;/Amount&gt;
     &lt;Quantity&gt;50&lt;/Quantity&gt;
     &lt;UnitAmount&gt;8&lt;/UnitAmount&gt;
  &lt;/Result&gt;
  &lt;/License&gt;
     &lt;PartnerDiscount i:nil="true"/&gt;
  &lt;/CalculatorResult&gt;
  </code></pre>
  
  <p>How can i extract these values from the API request.If i execute the <code>"RequestUri"</code>from API response i get the exact data.
  What am i missing?</p>