def get_url(uri, params={}, opts={})
header 'Accept', accept(opts[:format] || :xml)
if DeltacloudTestCommon::recording?
VCR.use_cassette("get-" + Digest::SHA1.hexdigest("#{uri}-#{params}}")) do
get(uri, params || {}, opts[:auth] ? authenticate(opts) : {})
end
else
get(uri, params || {}, opts[:auth] ? authenticate(opts) : {})
if last_response.status.to_s =~ /5(\d{2})/
puts "============= [ ERROR ] ================"
puts last_response.inspect
puts "========================================"
end
end
last_response.status.should_not == 401
end