diff options
author | Thom May <thom@may.lt> | 2018-03-14 15:20:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-14 15:20:47 +0000 |
commit | e20de6e6a79d0e16d4acc4f6eb7b6edebfaf4779 (patch) | |
tree | da0324c197e074f33b83f1159311366b9fc2cddf /lib/chef/server_api.rb | |
parent | adf7574a076056a46325d5e764b9878793295d60 (diff) | |
download | chef-e20de6e6a79d0e16d4acc4f6eb7b6edebfaf4779.tar.gz |
Revert "Knife should give a useful error when the chef_server_url isn't a chef server API"revert-6253-feat/5556
Diffstat (limited to 'lib/chef/server_api.rb')
-rw-r--r-- | lib/chef/server_api.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/chef/server_api.rb b/lib/chef/server_api.rb index d539ed5fed..c501544954 100644 --- a/lib/chef/server_api.rb +++ b/lib/chef/server_api.rb @@ -25,7 +25,6 @@ require "chef/http/json_output" require "chef/http/remote_request_id" require "chef/http/validate_content_length" require "chef/http/api_versions" -require "ffi_yajl" class Chef class ServerAPI < Chef::HTTP @@ -58,21 +57,6 @@ class Chef alias :post_rest :post alias :put_rest :put - def get(path, headers = {}) - request(:GET, path, headers) - rescue Net::HTTPServerException => e - if e.response.kind_of?(Net::HTTPNotFound) - begin - FFI_Yajl::Parser.parse(e.response.body) - rescue FFI_Yajl::ParseError => e - raise Chef::Exceptions::NotAChefServerException - end - raise - else - raise - end - end - # 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. |