# File tests/common.rb, line 128
  def post_url(uri, params={}, opts={})
    header 'Accept', accept(opts[:format] || :xml)
    if DeltacloudTestCommon::recording?
      if opts['vcr_cassette']
        VCR.use_cassette(opts['vcr_cassette']) do
          post(uri, params || {}, authenticate(opts))
        end
      else
        VCR.use_cassette("post-" + Digest::SHA1.hexdigest("#{uri}-#{params}")) do
          post(uri, params || {}, authenticate(opts))
        end
      end
    else
      post(uri, params || {}, authenticate(opts))
      if last_response.status.to_s =~ /5(\d{2})/
        puts "============= [ ERROR ] ================"
        puts last_response.body
        puts "============= [ RESPONSE ] ================"
        puts last_response.errors
        puts "========================================"
      end
    end
  end