Attributes
root_request | [RW] |
returns the top-most original |
Public Instance methods
max_redirects()
[show source]
# File lib/httpx/plugins/follow_redirects.rb 212 def max_redirects 213 @options.max_redirects || MAX_REDIRECTS 214 end
redirect_request()
returns the follow-up redirect request, or itself
[show source]
# File lib/httpx/plugins/follow_redirects.rb 195 def redirect_request 196 @redirect_request || self 197 end
redirect_request=(req)
sets the follow-up redirect request
[show source]
# File lib/httpx/plugins/follow_redirects.rb 200 def redirect_request=(req) 201 @redirect_request = req 202 req.root_request = @root_request || self 203 @response = nil 204 end
response()
[show source]
# File lib/httpx/plugins/follow_redirects.rb 206 def response 207 return super unless @redirect_request && @response.nil? 208 209 @redirect_request.response 210 end