lib/vra/http.rb in vmware-vra-2.7.0 vs lib/vra/http.rb in vmware-vra-2.7.1

- old
+ new

@@ -6,9 +6,14 @@ module Http def self.execute(params) request = Request.new(params) response = request.call response = response.forward(request).call until response.final? + if ENV["VRA_HTTP_TRACE"] + puts "#{request.params[:method].upcase} #{request.params[:url]}" unless request.params.nil? + puts ">>>>> #{JSON.parse(request.params[:payload]).to_json}" unless request.params[:payload].nil? + puts "<<<<< #{JSON.parse(response.body).to_json}" unless response.body.nil? + end raise error(response) unless response.success? response end def self.error(response)