title: Is there any way how to get HttpResponseMessage.Content body when response is HttpStatusCode.NoContent?
body: <p>I am using C# and .NET Core 3.0</p>
  
  <p>Currently when I send GET request to a server and it returns response with status <strong>204</strong>, then it seems that <code>System.Net.Http.HttpClient</code> strips body from it and I cannot read its content.</p>
  
  <pre><code>var request = new HttpRequestMessage(HttpMethod.Get,$"/gettask.ashx?testerror=20");
  var response = await _httpClient.SendAsync(request);
  var responseContent = await response.Content.ReadAsStringAsync();
  </code></pre>
  
  <p>I know the server is returning also body when status is 204. I have tested it with Curl and it returns this body for 204 <code>{ "nextRequestInSec" : 10 }</code>.</p>
  
  <p>Verbose response from curl:</p>
  
  <pre><code>curl http://address.dom/testerror=204 -v
  *   Trying xxx.xxx.xxx.xxx...
  * TCP_NODELAY set
  * Connected to address.dom (xxx.xxx.xxx.xxx) port 80 (#0)
  &gt; GET testerror=204 HTTP/1.1
  &gt; Host: address.dom
  &gt; User-Agent: curl/7.55.1
  &gt; Accept: */*
  &gt;
  &lt; HTTP/1.1 204 No Content
  &lt; Cache-Control: private
  &lt; Transfer-Encoding: chunked
  &lt; Content-Type: text/html; charset=utf-8
  &lt; Server: Microsoft-IIS/8.5
  &lt; X-AspNet-Version: 4.0.30319
  &lt; X-Powered-By: ASP.NET
  &lt; Date: Wed, 20 Nov 2019 13:45:00 GMT
  &lt;
  { "nextRequestInSec" : 10 }* Connection #0 to host address.dom left intact
  </code></pre>
  
  <p>For other responses (200, 401, 403, 404, 420, 500) it works correctly and I can read body as well.</p>
  
  <p>Is there any way how to get to this body?</p>