In-depth Exploration of Building Extensible API Clients with Req in Elixir

157
clicks
In-depth Exploration of Building Extensible API Clients with Req in Elixir

Source: youtube.com

Type: Video

In an insightful talk at ElixirConf EU 2024, Wojtek Mach delves into building API clients using the Req library. He starts by introducing himself and his work with Dashbit, where they help companies adopt and run Elixir in production. The talk begins with a simple 'hello world' example using Req, illustrating its utility as a batteries-included HTTP client for Elixir. Wojtek emphasizes Req's ability to handle common HTTP tasks such as automatic decompression and JSON decoding and analyzes the benefits of its extensibility. The focus shifts to API clients for large platforms like Stripe, highlighting the challenges and trade-offs of using traditional SDKs versus smaller, more manageable modules. Wojtek introduces the concept of Simple Development Kits (SDKs) to illustrate a more streamlined approach. He further details testing methodologies for API clients, including explicit contracts, local stubs, and ownership stubs, advocating for explicit boundaries between application logic and third-party services. The presentation concludes by stressing the flexibility and extensibility of Req and encourages developers to build tailored solutions rather than relying on massive dependencies.

© HashMerge 2025