Breaking Changes
- Migrate built-in HTTP from
hackneytoFinch - Replace the
:adapterwith the:clientoption
Upgrade instructions
Dependencies
FritzApi now ships with an HTTP client based on :finch instead of :hackney.
Add :finch to your list of dependencies in mix.exs:
def deps do
[
{:fritz_api, "~> 3.0"},
{:finch, "~> 0.16"},
]
endHTTP client (optional)
-
Remove the
:adapterconfiguration fromFritzApi.Client.new/1:{:ok, client} = FritzApi.Client.new( - adapter: {Tesla.Adapter.Gun, []} ) -
In
config/runtime.exsset the:fritz_api, :clientoption and to your own module that implements theFritzApi.HTTPClientbehaviour:+ config :fritz_api, + client: MyGunAdapter
See the documentation for FritzApi.HTTPClient for more information.
Full Changelog: v2.2.0...v3.0.0