summaryrefslogtreecommitdiff
path: root/lib/chef/http/json_output.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/http/json_output.rb')
-rw-r--r--lib/chef/http/json_output.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/chef/http/json_output.rb b/lib/chef/http/json_output.rb
index 6814fa1a55..982b329e4d 100644
--- a/lib/chef/http/json_output.rb
+++ b/lib/chef/http/json_output.rb
@@ -22,19 +22,17 @@ require "chef/log"
class Chef
class HTTP
-
# Middleware that takes an HTTP response, parses it as JSON if possible.
class JSONOutput
-
attr_accessor :raw_output
attr_accessor :inflate_json_class
- def initialize(opts={})
+ def initialize(opts = {})
@raw_output = opts[:raw_output]
@inflate_json_class = opts[:inflate_json_class]
end
- def handle_request(method, url, headers={}, data=false)
+ def handle_request(method, url, headers = {}, data = false)
# Ideally this should always set Accept to application/json, but
# Chef::REST is sometimes used to make non-JSON requests, so it sets
# Accept to the desired value before middlewares get called.
@@ -72,7 +70,6 @@ class Chef
def stream_response_handler(response)
nil
end
-
end
end
end