Refactor merb redirect following
This commit is contained in:
parent
ff3e869776
commit
5766ccf60f
@ -40,8 +40,9 @@ module Webrat
|
|||||||
def do_request(url, data, headers, method)
|
def do_request(url, data, headers, method)
|
||||||
@response = request(url,
|
@response = request(url,
|
||||||
:params => (data && data.any?) ? data : nil,
|
:params => (data && data.any?) ? data : nil,
|
||||||
:headers => headers, :method => method)
|
:headers => headers,
|
||||||
self.get(@response.headers['Location'], nil, @response.headers) if @response.status == 302
|
:method => method)
|
||||||
|
follow_redirect
|
||||||
end
|
end
|
||||||
|
|
||||||
def follow_redirect
|
def follow_redirect
|
||||||
|
Loading…
Reference in New Issue
Block a user