Skip to content

tallarium/tesla_extra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TeslaExtra

Additional Tesla middleware (plugs) that may be useful in various projects:

  • TeslaExtra.EncodeURI - ensures that the URI is properly encoded.
  • TeslaExtra.Extend - a plug for extending another client.
  • TeslaExtra.OptionalPlug - a plug that wraps another plug, allowed it to be de/activated dynamically.
  • TeslaExtra.RateLimit - rate limit middleware for Tesla using Hammer.
  • TeslaExtra.RetryAfter - obeys the Retry-After header returned by the server when the rate limit is exceeded.
  • TeslaExtra.RuntimeOpts - a plug that wraps another plug, allowing it to be configured with options which are evaluated on each call.
  • TeslaExtra.WithRequestId - adds a randomly generated request ID to the headers and request options.

Installation

This package can be installed by adding tesla_extra to your list of dependencies in mix.exs:

def deps do
  [
    {:tesla_extra, "~> 0.2"}
  ]
end

The docs can be found at https://hexdocs.pm/tesla_extra.

About

Additional Tesla middleware

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages