http_caller.rb revision 504e2ef5558494e5ea2cad1ffb5470d1b6e11d8b
DEFAULT_REDIRECTS = 10
end
end
# Currently only File and Tempfile are
# allowed for file_type.
end
end
end
end
if redirect_limit == 0
end
end
elsif is_redirection?(response)
else
end
end
end
success_response == false ? block.call : success_response
end
self.redirect_limit -= 1
end
# Redirection is only checked with the location header and not with the
# HTTP status code because it occurs sometimes that the status code is for
# redirection but there is no location header set, which fails the redirect.
end
else
end
end
if write_file
end
else
''
end
end
io = provide_io
io.rewind if io.respond_to?(:rewind)
io
end
def data_json
(data || {}).to_json
end
end
end