swoosh v1.4.0 Release Notes

  • ➕ Add Swoosh.ApiClient.Finch

    🔧 You can configure what API Client to use by setting the config. Swoosh comes with Swoosh.ApiClient.Hackney and Swoosh.ApiClient.Finch

    config :swoosh, :api_client, MyAPIClient
    

    0️⃣ It defaults to use :hackney with Swoosh.ApiClient.Hackney. To use Finch, add the below config

    config :swoosh, :api_client, Swoosh.ApiClient.Finch
    

    To use Swoosh.ApiClient.Finch you also need to start Finch, either in your supervision tree

    children = [
      {Finch, name: Swoosh.Finch}
    ]
    

    or somehow manually, and very rarely dynamically

    Finch.start_link(name: Swoosh.Finch)
    

    If a name different from Swoosh.Finch is used, or you want to use an existing Finch instance, you can provide the name via the config.

    config :swoosh,
      api_client: Swoosh.ApiClient.Finch,
      finch_name: My.Custom.Name
    

    🔊 Pre-1.4 changelogs