An HTTP client for Elixir built on top of hackney, offering a simple and flexible API for making requests.
HTTPoison is an HTTP client library for the Elixir programming language, designed to provide a clean and intuitive interface for making HTTP requests. It is built on top of the robust hackney Erlang library, offering reliability and performance while maintaining ease of use for Elixir developers. The library simplifies common tasks like making GET, POST, and other HTTP requests with pattern-matching responses and supports features like async requests and multipart data.
Elixir developers who need a reliable, performant HTTP client for building applications that interact with web APIs, such as those creating API clients, microservices, or tools requiring HTTP communication. It's particularly suited for developers who value Elixir's functional programming style and want a library that integrates seamlessly with the ecosystem.
Developers choose HTTPoison because it provides a lightweight, composable layer over the battle-tested hackney library, combining hackney's performance and connection pooling with an Elixir-friendly API. Its unique selling point is the ability to easily wrap HTTPoison.Base to build custom API clients, along with support for async requests, streaming, and fine-grained SSL and timeout controls.
Yet Another HTTP client for Elixir powered by hackney
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides straightforward functions like `get` and `post` with pattern matching on responses, making it intuitive for Elixir's functional style, as shown in usage examples.
Enables asynchronous HTTP requests with streaming capabilities for large responses, demonstrated in the async request section with warnings for message flooding.
Integrates with hackney's connection pools for improved performance, with configurable pools and options to disable them, detailed in the connection pools section.
Allows wrapping HTTPoison.Base to build custom API clients, exemplified by the GitHub module that preprocesses URLs and responses.
Major version upgrades, like 2.x.x, introduced changes in SSL option handling that require code adjustments, indicating potential instability for existing implementations.
Lacks built-in support for common patterns like automatic retries or circuit breakers, forcing developers to implement them manually or rely on other libraries.
Async requests can flood receivers with messages, as warned in the README, necessitating careful use of `async: :once` and manual chunk processing with `HTTPoison.stream_next/1`.