title: Why isn't reqwest returning the content length in this request?
body: <p>I'm confused why I'm not getting any content back from the following function, which uses <code>reqwest</code>:</p>
  
  <pre><code>  fn try_get() {
        let wc = reqwest::Client::new();
        wc.get("https://httpbin.org/json").send().map(|res| {
            println!("{:?}", res);
            println!("length {:?}", res.content_length());
        });
    }
  </code></pre>
  
  <p>I'm expecting this function to display the response object and then give me the content length. It does the first but not the second:</p>
  
  <pre class="lang-none prettyprint-override"><code>Response { url: "https://httpbin.org/json", status: 200, headers: {"access-control-allow-credentials": "true", "access-control-allow-origin": "*", "connection": "keep-alive", "content-type": "application/json", "date": "Tue, 26 Feb 2019 00:52:47 GMT", "server": "nginx"} }
  length None
  </code></pre>
  
  <p>This is confusing because if I hit the same endpoint using cURL, it gives me a body as expected:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ curl -i https://httpbin.org/json
  HTTP/1.1 200 OK
  Access-Control-Allow-Credentials: true
  Access-Control-Allow-Origin: *
  Content-Type: application/json
  Date: Tue, 26 Feb 2019 00:54:57 GMT
  Server: nginx
  Content-Length: 429
  Connection: keep-alive
  
  {
    "slideshow": {
      "author": "Yours Truly",
      "date": "date of publication",
      "slides": [
        {
          "title": "Wake up to WonderWidgets!",
          "type": "all"
        },
        {
          "items": [
            "Why &lt;em&gt;WonderWidgets&lt;/em&gt; are great",
            "Who &lt;em&gt;buys&lt;/em&gt; WonderWidgets"
          ],
          "title": "Overview",
          "type": "all"
        }
      ],
      "title": "Sample Slide Show"
    }
  }
  </code></pre>
  
  <p>What is the problem with my function that it does not provide me with the content length?</p>