diff options
author | danielsdeleo <dan@opscode.com> | 2013-10-04 13:59:14 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-10-08 15:01:47 -0700 |
commit | 56cc74a74f627663f7b5bbfef3d477d885925f56 (patch) | |
tree | 33dc2dcf19af24f7877922aa560e337e0caa075f /lib/chef/rest.rb | |
parent | e97402977c16e86259e6dc234ca45ef79e858788 (diff) | |
download | chef-56cc74a74f627663f7b5bbfef3d477d885925f56.tar.gz |
Extract HTTP cookie handling to middleware
Diffstat (limited to 'lib/chef/rest.rb')
-rw-r--r-- | lib/chef/rest.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/rest.rb b/lib/chef/rest.rb index 03ebb99152..fe416bc619 100644 --- a/lib/chef/rest.rb +++ b/lib/chef/rest.rb @@ -30,6 +30,7 @@ end require 'chef/http/authenticator' require 'chef/http/decompressor' require 'chef/http/json_to_model_inflater' +require 'chef/http/cookie_manager' require 'chef/config' require 'chef/exceptions' require 'chef/platform/query_helpers' @@ -58,6 +59,7 @@ class Chef super(url, options) @chef_json_inflater = JSONToModelInflater.new(options) + @cookie_manager = CookieManager.new(options) @decompressor = Decompressor.new(options) @authenticator = Authenticator.new(options) end @@ -134,7 +136,7 @@ class Chef # Chef::REST doesn't define middleware in the normal way for backcompat reasons, so it's hardcoded here. def middlewares - [@chef_json_inflater, @decompressor, @authenticator] + [@chef_json_inflater, @cookie_manager, @decompressor, @authenticator] end alias :api_request :request |