Extending Chef from Opscode with header params for http_request

Posted by Edmund Haselwanter on Friday, July 31, 2009

Added support for custom header options in chef for the http_request

Opscode Chef Ticket
Resolved on Github

An example using a custom "Host" header property:
   1  http_request "localhost_with_host_header" do
   2    url "localhost"
   3    message "my request"
   4    headers Hash[:Host => "my-real.hostname.com"]
   5  end
The new parameter is headers which takes a Hash and will add all values.to_s to the request header.