From 7aeda4262362d109b0d451946a35912e0cae046f Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Sun, 18 Aug 2024 11:47:06 +1200 Subject: [PATCH] Add changes. --- changes.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 changes.md diff --git a/changes.md b/changes.md new file mode 100644 index 0000000..b6eb28f --- /dev/null +++ b/changes.md @@ -0,0 +1,17 @@ +# v0.18.0 + +## Config Block + +The `config_block` provided to the adapter must now return `nil`, `client` or a middleware wrapper around `client`. + +```ruby +Faraday.new do |builder| + builder.adapter :async_http do |client| + # Option 1 (same as returning `nil`), use client as is: + client # Use `client` as is. + + # Option 2, wrap client in a middleware: + Async::HTTP::Middleware::LocationRedirector.new(client) + end +end +```