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
166 167 168 |
# File 'lib/httpx/plugins/retries.rb', line 166 def partial_response=(value) @partial_response = value end |
#retries ⇒ Object
Returns the value of attribute retries.
164 165 166 |
# File 'lib/httpx/plugins/retries.rb', line 164 def retries @retries end |
Instance Method Details
#initialize(*args) ⇒ Object
168 169 170 171 |
# File 'lib/httpx/plugins/retries.rb', line 168 def initialize(*args) super @retries = .max_retries end |
#response=(response) ⇒ Object
173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/httpx/plugins/retries.rb', line 173 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 |