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
188 189 190 |
# File 'lib/httpx/plugins/retries.rb', line 188 def partial_response=(value) @partial_response = value end |
#retries ⇒ Object
Returns the value of attribute retries.
186 187 188 |
# File 'lib/httpx/plugins/retries.rb', line 186 def retries @retries end |
Instance Method Details
#initialize(*args) ⇒ Object
190 191 192 193 |
# File 'lib/httpx/plugins/retries.rb', line 190 def initialize(*args) super @retries = .max_retries end |
#response=(response) ⇒ Object
195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/httpx/plugins/retries.rb', line 195 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 |