Class: TargetIO::HTTP
- Inherits:
-
Object
- Object
- TargetIO::HTTP
- Extended by:
- Forwardable
- Defined in:
- lib/chef/target_io/http.rb
Defined Under Namespace
Classes: SimpleJSON
Instance Method Summary collapse
-
#initialize(url, http_client_opts = {}) ⇒ HTTP
constructor
A new instance of HTTP.
Constructor Details
#initialize(url, http_client_opts = {}) ⇒ HTTP
Returns a new instance of HTTP.
15 16 17 18 19 20 21 |
# File 'lib/chef/target_io/http.rb', line 15 def initialize(url, http_client_opts = {}) if ::ChefConfig::Config.target_mode? @http_class = TargetIO::TrainCompat::HTTP.new(url, http_client_opts) else @http_class = Chef::HTTP::Simple.new(url, http_client_opts) end end |