title: Reading HttpContent from HttpResponseMessage
body: <p>I am sending <code>HttpResponseMessage</code> as following from My API controller</p>
  
  <pre><code>public HttpResponseMessage Upload()
  {
      HttpResponseMessage response = new HttpResponseMessage();
      HttpRequestMessage request = new HttpRequestMessage();
      if (System.Web.HttpContext.Current.Request.Files.Count &gt; 0)
      {
          var file = System.Web.HttpContext.Current.Request.Files[0];
          var path = System.Web.Hosting.HostingEnvironment.MapPath("----------");
          bool folderExists = Directory.Exists(path);
          if (!folderExists)
              Directory.CreateDirectory(path);
  
          string pathWithFileName = Path.Combine(path, file.FileName);
          file.SaveAs(pathWithFileName);
  
          response.StatusCode = HttpStatusCode.Created;
          response.Content = new StringContent(pathWithFileName, System.Text.Encoding.UTF8, "application/json");
  
          response.Content = new JsonContent(new
          {
              Name = "a",
              Address = "b",
              Message = "Any Message" 
          });   
  
          return response;
      }
      else
      {
          response.StatusCode = HttpStatusCode.BadRequest;
          return response;
      }
  }
  </code></pre>
  
  <p>I am trying to read contents as following</p>
  
  <p>1 - Created an extension method</p>
  
  <pre><code>public static string ContentToString(this HttpContent httpContent)
  {
      var readAsStringAsync = httpContent.ReadAsStringAsync();
      return readAsStringAsync.Result;
  }
  </code></pre>
  
  <p>Read contents as following</p>
  
  <pre><code>var av = result.Content.ContentToString();
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>{"result":null,"targetUrl":null,"success":true,"error":null,"unAuthorizedRequest":false,"__abp":true}
  </code></pre>
  
  <p>Why I don't get contents?
  Please advise.</p>