module HTTPX::Plugins::RateLimiter

  1. lib/httpx/plugins/rate_limiter.rb

This plugin adds support for retrying requests when the request:

  • is rate limited;

  • when the server is unavailable (503);

  • when a 3xx request comes with a “retry-after” value

gitlab.com/os85/httpx/wikis/Rate-Limiter

Methods

Public Class

  1. load_dependencies

Constants

RATE_LIMIT_CODES = [429, 503].freeze  

Public Class methods

load_dependencies(klass)
[show source]
   # File lib/httpx/plugins/rate_limiter.rb
18 def load_dependencies(klass)
19   klass.plugin(:retries)
20 end