What's New in Req v0.5

245
clicks
What's New in Req v0.5

Source: dashbit.co

Type: Post

Wojtek Mach announced the release of Req v0.5.0, which brings significant improvements and new features to the Req HTTP client library. The update focuses on enhancing testing capabilities by introducing request expectations using `Req.Test.expect/3`, allowing more sophisticated test setups without added complexity. Additionally, network errors can now be simulated with `Req.Test.transport_error/2`. Error handling has been standardized, replacing multiple exception types with consistent `Req.TransportError` and `Req.HTTPError` structs. The release also adds new exception types for dealing with archive and decompression errors. Another notable feature is `%Req.Response.Async{}`, which facilitates streaming response body chunks using the `Enumerable` protocol. The release aims to improve the developer experience by offering more robust testing tools and consistent error handling. The changelog provides further details on these improvements.

© HashMerge 2024