danhper / elixir-web-push-encryption

Elixir implementation of Web Push Payload encryption.
https://hex.pm/packages/web_push_encryption
MIT License
59 stars 42 forks source link

Use Tesla for outgoing HTTP request #20

Open tanguilp opened 4 years ago

tanguilp commented 4 years ago

Simply a suggestion, Tesla allows adding middlewares that could be useful, for instance:

It also allows choosing a different adapter.

Great lib btw!

tanguilp commented 4 years ago

Also HTTP 503 errors with errno 201 (https://autopush.readthedocs.io/en/latest/http.html#error-codes) could be handled with the Tesla.Middleware.Retry middleware automatically.

danhper commented 4 years ago

Hi and sorry for the delay. I do not have time to add this myself but I am very open to PRs. Thanks!