diff options
author | danielsdeleo <dan@opscode.com> | 2013-10-28 14:11:53 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-10-28 14:11:53 -0700 |
commit | 8cc0c8060c103cfe8d7875c8611dde47865d4214 (patch) | |
tree | 7a6875d1e6cf6dbb3465aa74ae38c09fd5c14c84 /lib/chef/http | |
parent | 0e2afa8d488e1b8063114e0461bbdd0c380b0b5e (diff) | |
download | chef-8cc0c8060c103cfe8d7875c8611dde47865d4214.tar.gz |
Debug request headers
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/basic_client.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/http/basic_client.rb b/lib/chef/http/basic_client.rb index 5ee0fbf88d..c3421703d5 100644 --- a/lib/chef/http/basic_client.rb +++ b/lib/chef/http/basic_client.rb @@ -57,6 +57,10 @@ class Chef def request(method, url, req_body, base_headers={}) http_request = HTTPRequest.new(method, url, req_body, base_headers).http_request Chef::Log.debug("Initiating #{method} to #{url}") + Chef::Log.debug("---- HTTP Request Header Data: ----") + base_headers.each do |name, value| + Chef::Log.debug("#{name}: #{value}") + end http_client.request(http_request) do |response| yield response if block_given? # http_client.request may not have the return signature we want, so |