elixir-web-push-encryption icon indicating copy to clipboard operation
elixir-web-push-encryption copied to clipboard

Use Tesla for outgoing HTTP request

Open tanguilp opened this issue 5 years ago • 2 comments

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

  • logger, to see outgoing requests in dev env
  • telemetry
  • retry, in case we reach the push service's rate limit

It also allows choosing a different adapter.

Great lib btw!

tanguilp avatar May 21 '20 09:05 tanguilp

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.

tanguilp avatar May 22 '20 10:05 tanguilp

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

danhper avatar Aug 09 '20 19:08 danhper