Best way to manually open/close http connections?

Does anyone know how to do it with httpoison? If not I am open to switching the lib.

Ups: {"connection", "close"} header does it.
Edit: Maybe not.

Now I keep getting this on few pages(I think full body is included in response, not sure why HTTPoison errors it):

** (CaseClauseError) no case clause matching: {:error, %HTTPoison.Error{id: nil, reason: {:closed, 
"<!DOCTYPE html>\r\n\r\n\r\n    <html itemscope itemtype=\"http://schema.org/QAPage\" class=\"html__respons
...

Is there a better way to close connection/remove from pool once I got response 200?

1 Like