Class: Chef::Knife::Raw::RawInputServerAPI
- Defined in:
- lib/chef/knife/raw.rb
Overview
We need a custom HTTP client class here because we don’t want to even try to decode the body, in case we get back corrupted JSON or whatnot.
Instance Attribute Summary
Attributes inherited from HTTP
#keepalives, #middlewares, #options, #redirect_limit, #sign_on_redirect, #url
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RawInputServerAPI
constructor
A new instance of RawInputServerAPI.
Methods inherited from HTTP
#delete, #get, #head, #http_client, #last_response, middlewares, #post, #put, #request, #streaming_request, #streaming_request_with_progress, use
Constructor Details
#initialize(options = {}) ⇒ RawInputServerAPI
Returns a new instance of RawInputServerAPI.
61 62 63 64 65 66 67 68 |
# File 'lib/chef/knife/raw.rb', line 61 def initialize( = {}) # If making a change here, also update Chef::ServerAPI. [:client_name] ||= Chef::Config[:node_name] [:raw_key] ||= Chef::Config[:client_key_contents] [:signing_key_filename] ||= Chef::Config[:client_key] unless [:raw_key] [:ssh_agent_signing] ||= Chef::Config[:ssh_agent_signing] super(Chef::Config[:chef_server_url], ) end |