Skip to content

Expose config to update used http client #100

Description

@gBillal

Currently onvif project uses tesla library with Finch as an adapter, we want a config to allow providing a different adapter.
I can provide two reasons for my use cases:

  • I had a problem using Finch with IP cameras, sometimes finch opens a lot of connections and are not closed which hits the limit of erlang ports.
  • I want to add config to the adapter. As an example, milesight cameras has a bug where the Authorization header should not be lower cased otherwise it won't be recognized.

What I suggest is to add a config

config :onvif, http_adapter: Tesla.Adapter.Mint, http_adapter_options: [case_sensitive_headers: true]

One thing here is that we'll expose the underlying http lib to the users. We can add an abstraction on top however tesla itself is an abstraction so I prefer we keep it like this.

If you don't have any issues with this, I can open a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions