Attributes
partial_response | [W] |
a response partially received before. |
retries | [RW] |
number of retries left. |
Public Class methods
new(*args)
initializes the request instance, sets the number of retries for the request.
[show source]
# File lib/httpx/plugins/retries.rb 201 def initialize(*args) 202 super 203 @retries = @options.max_retries 204 end
Public Instance methods
response=(response)
[show source]
# File lib/httpx/plugins/retries.rb 206 def response=(response) 207 if @partial_response 208 if response.is_a?(Response) && response.status == 206 209 response.from_partial_response(@partial_response) 210 else 211 @partial_response.close 212 end 213 @partial_response = nil 214 end 215 216 super 217 end