title: How to retrieve the IP address of the client from HttpRequest in actix-web?
body: <p>Is it possible to obtain the IP address from a <code>HttpRequest</code> argument?</p>
  <p>This is my code:</p>
  <pre class="lang-rust prettyprint-override"><code>#[get(&quot;/collect&quot;)]
  pub async fn collect(req: HttpRequest) -&gt; impl Responder {
      println!(&quot;collect {:?}&quot;, req);
      HttpResponse::Ok()
  }
  </code></pre>
  <pre><code>[dependencies]
  actix-web = &quot;3&quot;
  </code></pre>