defmodule Securion.RateLimitMiddleware do @moduledoc """ The poor man's rate limiting middleware. It simply sleeps for a while before making a request. """ @behaviour Tesla.Middleware @duration 500 def call(env, next, _options) do Process.sleep(@duration) Tesla.run(env, next) end end