title: How can I accept invalid or self-signed SSL certificates in Rust futures reqwest?
body: <p>My code looks like the following:</p>
  <pre class="lang-rust prettyprint-override"><code>let fetches = futures::stream::iter(
      hosts.into_iter().map(|url| {
          async move {
                  match reqwest::get(&amp;url).await {
                      // Ok and Err statements here!
                  }
  </code></pre>
  <p>But, the problem here is that it gives an error for URLs with invalid or self-signed SSL certificate. So, I tried to do the following:</p>
  <pre class="lang-rust prettyprint-override"><code>let fetches = futures::stream::iter(
      hosts.into_iter().map(|url| {
          async move {
              match reqwest::Client::builder().danger_accept_invalid_certs(true).build().unwrap().get(&amp;url).await {
                  // Ok and Err statements here!
              }
  </code></pre>
  <p>When I try to build it with Cargo, it says &quot;<em>error[E0277]: `RequestBuilder` is not a future</em>&quot;.</p>
  <p>So, how can I make my code accept invalid certificates?</p>