Guest User

Untitled

a guest
Jul 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. diff --git a/lib/puppet/indirector/rest.rb b/lib/puppet/indirector/rest.rb
  2. index a89e986..3e20b53 100644
  3. --- a/lib/puppet/indirector/rest.rb
  4. +++ b/lib/puppet/indirector/rest.rb
  5. @@ -43,6 +43,8 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
  6.  
  7. content_type = response['content-type'].gsub(/\s*;.*$/,'') # strip any appended charset
  8.  
  9. + File.open("/tmp/#{indirection.name}.#{content_type}", "w") { |f| f.print response.body }
  10. +
  11. # Convert the response to a deserialized object.
  12. if multiple
  13. model.convert_from_multiple(content_type, response.body)
Add Comment
Please, Sign In to add comment