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 244 def initialize(*args) 245 super 246 @retries = @options.max_retries 247 @partial_response = nil 248 end
Public Instance methods
response=(response)
[show source]
# File lib/httpx/plugins/retries.rb 250 def response=(response) 251 if (partial_response = @partial_response) 252 if response.is_a?(Response) && response.status == 206 253 response.from_partial_response(partial_response) 254 else 255 partial_response.close 256 end 257 @partial_response = nil 258 end 259 260 super 261 end