@@ -52,7 +52,7 @@ module HTTP
5252 def default_options= : (untyped opts) -> Options
5353 def nodelay : () -> Session
5454 def use : (*untyped features) -> Session
55- def retriable : (**untyped options) -> Retriable:: Session
55+ def retriable : (**untyped options) -> Session
5656
5757 private
5858
@@ -83,6 +83,8 @@ module HTTP
8383
8484 private
8585
86+ def perform_once : (Request req, Options options) -> Response
87+ def perform_with_retry : (Request req, Options options) -> Response
8688 def wrap_request : (Request req, Options opts) -> Request
8789 def build_response : (Request req, Options options) -> Response
8890 def build_wrapped_response : (Request req, Options options) -> Response
@@ -428,6 +430,7 @@ module HTTP
428430 attr_reader features: Hash[Symbol, Feature]
429431
430432 def follow= : (untyped value) -> untyped
433+ def retriable= : (untyped value) -> untyped
431434 def persistent= : (untyped value) -> String?
432435 def persistent? : () -> bool
433436 def merge : (untyped other) -> Options
@@ -454,13 +457,15 @@ module HTTP
454457 attr_accessor cookies: Hash[untyped , untyped ]
455458 attr_accessor encoding: Encoding?
456459 attr_reader follow: Hash[untyped , untyped ]?
460+ attr_reader retriable: Hash[untyped , untyped ]?
457461 attr_reader persistent: String?
458462
459463 def with_headers : (untyped value) -> Options
460464 def with_cookies : (untyped value) -> Options
461465 def with_encoding : (untyped value) -> Options
462466 def with_features : (untyped value) -> Options
463467 def with_follow : (untyped value) -> Options
468+ def with_retriable : (untyped value) -> Options
464469 def with_persistent : (untyped value) -> Options
465470 def with_proxy : (untyped value) -> Options
466471 def with_params : (untyped value) -> Options
@@ -1059,29 +1064,6 @@ module HTTP
10591064 end
10601065
10611066 module Retriable
1062- class Session < HTTP::Session
1063- @performer: untyped
1064-
1065- def initialize : (untyped performer, untyped options) -> void
1066-
1067- private
1068-
1069- def branch : (Options options) -> Retriable::Session
1070- def make_client : (Options options) -> Retriable::Client
1071- end
1072-
1073- class Client < HTTP::Client
1074- @performer: untyped
1075-
1076- def initialize : (untyped performer, untyped options) -> void
1077- def perform : (Request req, Options options) -> Response
1078-
1079- private
1080-
1081- def branch : (Options options) -> Retriable::Session
1082- def make_client : (Options options) -> Retriable::Client
1083- end
1084-
10851067 class Performer
10861068 RETRIABLE_ERRORS: Array[untyped ]
10871069
0 commit comments