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 252 def initialize(*args) 253 super 254 @retries = @options.max_retries 255 @partial_response = nil 256 end
Public Instance methods
response=(response)
[show source]
# File lib/httpx/plugins/retries.rb 258 def response=(response) 259 if (partial_response = @partial_response) 260 if response.is_a?(Response) && response.status == 206 261 response.from_partial_response(partial_response) 262 else 263 partial_response.close 264 end 265 @partial_response = nil 266 end 267 268 super 269 end