A batteries-included, extensible HTTP client for Elixir with built-in compression, authentication, retries, and streaming.
Req is an HTTP client library for Elixir that provides a comprehensive set of built-in features for making web requests. It solves the problem of needing to manually handle common HTTP concerns like decompression, authentication, retries, and redirects by including them out of the box. Its modular step architecture allows developers to easily customize or extend its behavior.
Elixir developers building applications that interact with HTTP APIs, especially those who need a robust, feature-complete client without assembling multiple dependencies.
Developers choose Req for its 'batteries-included' approach, combining ease of use with powerful extensibility through its step system, eliminating boilerplate while maintaining full control over HTTP interactions.
Req is a batteries-included HTTP client for Elixir.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Virtually all features are implemented as composable steps, allowing easy customization, rearrangement, or creation of new steps, as shown with Req.Request.append_request_steps.
Supports gzip, brotli, and zstd for both request and response bodies, with built-in steps like decompress_body that eliminate manual decompression code.
Enables efficient streaming of request and response bodies by setting body to an enumerable or using the into option, demonstrated with Stream.duplicate and IO.stream().
Easily extends functionality with community plugins for HTML parsing, S3, Hex, and OAuth, as seen with req_easyhtml and req_github_oauth attachments.
On macOS, additional linker flags are required to compile Brotli, adding unnecessary complexity to the development environment setup.
The built-in HTTP caching is described as 'basic' in the README, which may not meet needs for advanced cache invalidation or distributed scenarios.
With numerous steps and options, newcomers might find it overwhelming to configure beyond defaults, especially for simple use cases.