summaryrefslogtreecommitdiff
path: root/lib/chef/rest.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-10-09 12:26:27 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-10-09 12:26:27 -0700
commita5337fcad5ed979078b6cf57c7e1e6ec8f0b76cf (patch)
tree11a5e98513f9496d3ce15a823e7a84cd4d178f58 /lib/chef/rest.rb
parent836705dee684032baa85920c808a3eca5f5a8a87 (diff)
downloadchef-a5337fcad5ed979078b6cf57c7e1e6ec8f0b76cf.tar.gz
Use new Chef::ServerAPI API class in upload/download/diff
Diffstat (limited to 'lib/chef/rest.rb')
-rw-r--r--lib/chef/rest.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/rest.rb b/lib/chef/rest.rb
index 236e4cbac2..1a60fa093e 100644
--- a/lib/chef/rest.rb
+++ b/lib/chef/rest.rb
@@ -29,7 +29,8 @@ end
require 'chef/http/authenticator'
require 'chef/http/decompressor'
-require 'chef/http/json_to_model_inflater'
+require 'chef/http/json_input'
+require 'chef/http/json_to_model_output'
require 'chef/http/cookie_manager'
require 'chef/config'
require 'chef/exceptions'
@@ -61,7 +62,8 @@ class Chef
@decompressor = Decompressor.new(options)
@authenticator = Authenticator.new(options)
- @middlewares << JSONToModelInflater.new(options)
+ @middlewares << JSONInput.new(options)
+ @middlewares << JSONToModelOutput.new(options)
@middlewares << CookieManager.new(options)
@middlewares << @decompressor
@middlewares << @authenticator
@@ -97,9 +99,9 @@ class Chef
# to JSON inflated.
def get(path, raw=false, headers={})
if raw
- streaming_request(create_url(path), headers)
+ streaming_request(path, headers)
else
- request(:GET, create_url(path), headers)
+ request(:GET, path, headers)
end
end