Is there any module for Erlang that works like Python’s “Requests” module?
I tend to just use the http client module directly.
httpc module
You have choices;
httpc - https://www.erlang.org/doc/man/httpc.html (built in)
hackney: https://hex.pm/packages/hackney
gun: https://hex.pm/packages/gun
lhttpc: https://hex.pm/packages/lhttpc
dlhttpc: https://github.com/ferd/dlhttpc
Personally I use hackney unless I need long-lived http2 connections to external systems, in which case, gun
Thanks. At first glance it seems like, one can change headers, use proxy and also implement proxy authentication. Please correct me if I’m wrong.
Thanks for additional info, I’ll check them.
GitHub - ninenines/gun: HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP. HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP.
Thanks for both of your replies.
That’s a great way to split them up. gun is also really good for outgoing websocket connections, as it provides a really detailed level of messaging about all the steps and states of the conversation, so you can get into really fine-grained control of what you’re doing.