diff --git a/lib/puppet/indirector/rest.rb b/lib/puppet/indirector/rest.rb
index a89e986..3e20b53 100644
--- a/lib/puppet/indirector/rest.rb
+++ b/lib/puppet/indirector/rest.rb
@@ -43,6 +43,8 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
content_type = response['content-type'].gsub(/\s*;.*$/,'') # strip any appended charset
+ File.open("/tmp/#{indirection.name}.#{content_type}", "w") { |f| f.print response.body }
+
# Convert the response to a deserialized object.
if multiple
model.convert_from_multiple(content_type, response.body)