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