title: How to solve HTTPotion conn_failed intermittent error
body: <p>Sometime I got intermittent error<code>%HTTPotion.ErrorResponse{message: "{:conn_failed, :error}"}</code>.</p>
  
  <pre><code>headers = ["Content-Type": "application/json"]
  HTTPotion.post(&lt;URL&gt;, body: body, headers: headers, timeout: 20_000, recv_timeout: 20_000)
  </code></pre>
  
  <p>If I curl the same request OR use <code>direct</code> as below, I got response successfully.</p>
  
  <pre><code>{:ok, worker_pid} = HTTPotion.spawn_worker_process(&lt;URL&gt;)
  HTTPotion.post(&lt;URL&gt;, body: body, headers: headers,  timeout: 20_000, recv_timeout: 20_000, direct: worker_pid)
  </code></pre>