ScalewayDDNS::HTTPHelper
Shared HTTP plumbing for the external APIs used by the updater.
Constants
CONNECT_TIMEOUT = 10.seconds
Maximum time allowed to establish a connection.
MAX_ATTEMPTS = 3
Number of times a request is attempted before giving up.
READ_TIMEOUT = 30.seconds
Maximum time allowed to receive a response once connected.
RETRY_DELAY = 1.second
Base delay between two attempts, multiplied by the attempt number.
Class methods
execute(host : String, method : String, path : String, headers : HTTP::Headers | Nil = nil, body : String | Nil = nil) : HTTP::Client::Response
Executes a request against host, retrying transient connection failures.
Returns a synthetic 408 response when every attempt fails, so that callers only have to deal with a status code.