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 199 def initialize(*args) 200 super 201 @retries = @options.max_retries 202 end
Public Instance methods
response=(response)
[show source]
# File lib/httpx/plugins/retries.rb 204 def response=(response) 205 if @partial_response 206 if response.is_a?(Response) && response.status == 206 207 response.from_partial_response(@partial_response) 208 else 209 @partial_response.close 210 end 211 @partial_response = nil 212 end 213 214 super 215 end