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