Skip to content
ZeroServer.tools

curl to Elixir

Convert curl commands to Elixir HTTPoison HTTP client code. Supports headers, request body, authentication, and all common HTTP methods.

Presets:
HTTP Method
POST
Headers Detected
2
Body Bytes
44 B
Elixir Size
14 lines (301 B)

Looks like this contains credentials. They are converted in this tab only — not uploaded, and not included in the link that Share or Copy link produces.

About curl to Elixir conversion

Elixir's HTTPoison library is a popular HTTP client built on Hackney. This converter maps curl flags to HTTPoison calls:-H becomes a headers list of tuples, and -d becomes the body argument. GET and POST use the convenience functions while other HTTP methods use HTTPoison.request/4. Add {:httpoison, "~> 2.0"} to your mix.exs dependencies.

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate

Related Developer Utilities tools