Fl4m3Ph03n1x
How to use pools with HTTPotion?
Background
I am looking for alternative HTTP libraries to HTTPoison. Once such library is HTTPotion.
Problem
However I need to use pools, but the documentation doesn’t mention them. I don’t know how nor if I can do it.
Question
- How do I use request pools with HTTPotion?
Marked As Solved
Fl4m3Ph03n1x
Solution
You can’t. HTTPotion doesn’t support pools, so if you want to use pools you would have to use something like poolboy and join them together.
@OvermindDL1
I believe Tesla is overkill. All I want to do are simple HTTP GET requests. Millions of them. Hackney can’t handle it so I can’t use anything that uses Hackney. But thanks for the link, it sure looks interesting.
Off-topic
This question was started because I was considering using pools with HTTPotion. The reason for this is that I usually default to using pools in every component I make without thinking, but Elixir is different in that processes are so cheap it is game changing.
Thus, I created another topic to reflect this:
Feel free to drop your 2cents.
Also Liked
benwilson512
Did you look at using GitHub - ninenines/gun: HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP. · GitHub?
OvermindDL1
HTTPoison tends to be a lot more featureful than HTTPotion as it’s based on hackney and HTTPotion is based on ibrowse.
If Hackney’s/HTTPoison’s pools are insufficient, have you looked at Tesla instead? It supports a variety of backends (the default recommended one is indeed still hackney) but a unified interface to them all so you can try different ones for your purpose.
And it’s not hard to make your own pool either. ![]()
Fl4m3Ph03n1x
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










