httpx/sig/plugins/retries.rbs
HoneyryderChuck 9363d09af8 removed with_ methods from option (not of real world use)
removed with_ options, which are unsupported, undocumented and irrelevant (contrary to the similar with session methods)
2021-03-23 16:30:45 +00:00

45 lines
1.1 KiB
Plaintext

module HTTPX
module Plugins
module Retries
MAX_RETRIES: Integer
IDEMPOTENT_METHODS: Array[verb]
RETRYABLE_ERRORS: Array[singleton(StandardError)]
interface _RetryCallback
def call: (response) -> bool?
end
interface _RetriesOptions
def retry_after: () -> Numeric?
def retry_after=: (Numeric) -> Numeric
def max_retries: () -> Integer?
def max_retries=: (int) -> Integer
def retry_change_requests: () -> bool?
def retry_change_requests=: (bool) -> bool
def retry_on: () -> _RetryCallback?
def retry_on=: (_RetryCallback) -> _RetryCallback
end
def self.extra_options: (Options) -> (Options & _RetriesOptions)
module InstanceMethods
def max_retries: (int) -> instance
private
def __repeatable_request?: (Request, Options) -> boolish
def __retryable_error?: (_Exception) -> bool
end
module RequestMethods
def retries: () -> Integer
end
end
type sessionRetries = Session & Plugins::Retries::InstanceMethods
end
end