summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2016-01-20 16:54:10 +0000
committerThom May <thom@may.lt>2016-01-20 16:54:10 +0000
commit2b5ee9f273538f50b9264cf2e430dee68f0da021 (patch)
tree3ecb6cdc639bf7b81d81f3e3f3b292a01d8c1c36
parentd07d0ae3a23feda7b6e6bb371ea03a8817f7a9b6 (diff)
parent86abcf12542fb81e93f6600b8a5bed3d049e58c3 (diff)
downloadchef-2b5ee9f273538f50b9264cf2e430dee68f0da021.tar.gz
Merge pull request #4432 from chef/tm/back_compat_rest_calls
add get_rest etc calls to ServerAPI
-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.