summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-19 19:35:28 +0000
committerThom May <thom@chef.io>2016-01-20 15:29:31 +0000
commit86abcf12542fb81e93f6600b8a5bed3d049e58c3 (patch)
tree882aea04319a2e9131104424c926f6b5d946119f
parent25b2c0559caaf29872d6cfe3ab146cb63c496d00 (diff)
downloadchef-tm/back_compat_rest_calls.tar.gz
add get_rest etc calls to ServerAPItm/back_compat_rest_calls
and note in rspec that we want these gone in 13
-rw-r--r--lib/chef/server_api.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/server_api.rb b/lib/chef/server_api.rb
index b7e460fa6e..35f81f88b2 100644
--- a/lib/chef/server_api.rb
+++ b/lib/chef/server_api.rb
@@ -48,6 +48,12 @@ class Chef
# responses.
use Chef::HTTP::ValidateContentLength
+ # for back compat with Chef::REST, expose `<verb>_rest` as an alias to `<verb>`
+ alias :get_rest :get
+ alias :delete_rest :delete
+ alias :post_rest :post
+ alias :put_rest :put
+
# Makes an HTTP request to +path+ with the given +method+, +headers+, and
# +data+ (if applicable). Does not apply any middleware, besides that
# needed for Authentication.