module HTTPX::Plugins::FollowRedirects::RequestMethods

  1. lib/httpx/plugins/follow_redirects.rb

Attributes

root_request [RW]

returns the top-most original HTTPX::Request from the redirect chain

Public Instance methods

max_redirects()
[show source]
    # File lib/httpx/plugins/follow_redirects.rb
213 def max_redirects
214   @options.max_redirects || MAX_REDIRECTS
215 end
redirect_request()

returns the follow-up redirect request, or itself

[show source]
    # File lib/httpx/plugins/follow_redirects.rb
196 def redirect_request
197   @redirect_request || self
198 end
redirect_request=(req)

sets the follow-up redirect request

[show source]
    # File lib/httpx/plugins/follow_redirects.rb
201 def redirect_request=(req)
202   @redirect_request = req
203   req.root_request = @root_request || self
204   @response = nil
205 end
response()
[show source]
    # File lib/httpx/plugins/follow_redirects.rb
207 def response
208   return super unless @redirect_request && @response.nil?
209 
210   @redirect_request.response
211 end