Module: HTTPX::Plugins::Retries::RequestMethods
- Defined in:
- lib/httpx/plugins/retries.rb
Instance Attribute Summary collapse
-
#partial_response ⇒ Object
writeonly
Sets the attribute partial_response.
-
#retries ⇒ Object
Returns the value of attribute retries.
Instance Method Summary collapse
Instance Attribute Details
#partial_response=(value) ⇒ Object (writeonly)
Sets the attribute partial_response
185 186 187 |
# File 'lib/httpx/plugins/retries.rb', line 185 def partial_response=(value) @partial_response = value end |
#retries ⇒ Object
Returns the value of attribute retries.
183 184 185 |
# File 'lib/httpx/plugins/retries.rb', line 183 def retries @retries end |
Instance Method Details
#initialize(*args) ⇒ Object
187 188 189 190 |
# File 'lib/httpx/plugins/retries.rb', line 187 def initialize(*args) super @retries = @options.max_retries end |
#response=(response) ⇒ Object
192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/httpx/plugins/retries.rb', line 192 def response=(response) if @partial_response if response.is_a?(Response) && response.status == 206 response.from_partial_response(@partial_response) else @partial_response.close end @partial_response = nil end super end |