Sha256: 6040b5018c02ab9312de5efcedf8e2ca9650ef20ca65331116f538fd2cae6268

Contents?: true

Size: 1.3 KB

Versions: 21

Compression:

Stored size: 1.3 KB

Contents

#
# Author:: Adam Jacob (<adam@opscode.com>)
# Copyright:: Copyright (c) 2008 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require 'chef/resource'

class Chef
  class Resource
    class HttpRequest < Chef::Resource
      
      def initialize(name, run_context=nil)
        super
        @resource_name = :http_request
        @message = name
        @url = nil
        @action = :get
        @allowed_actions.push(:get, :put, :post, :delete, :head, :options)
      end
      
      def url(args=nil)
        set_or_return(
          :url,
          args,
          :kind_of => String
        )
      end
      
      def message(args=nil)
        set_or_return(
          :message,
          args,
          :kind_of => Object
        )
      end
      
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
tecnh-chef-0.9.9.vpc lib/chef/resource/http_request.rb
chef-0.9.8 lib/chef/resource/http_request.rb
chef-0.9.8.rc.0 lib/chef/resource/http_request.rb
chef-0.9.8.beta.2 lib/chef/resource/http_request.rb
chef-0.9.8.beta.1 lib/chef/resource/http_request.rb
chef-0.9.6 lib/chef/resource/http_request.rb
chef-0.9.4 lib/chef/resource/http_request.rb
chef-0.9.2 lib/chef/resource/http_request.rb
chef-0.9.0 lib/chef/resource/http_request.rb
chef-0.9.0.rc02 lib/chef/resource/http_request.rb
chef-0.9.0.rc01 lib/chef/resource/http_request.rb
chef-0.9.0.b02 lib/chef/resource/http_request.rb
chef-0.9.0.b01 lib/chef/resource/http_request.rb
chef-0.9.0.a92 lib/chef/resource/http_request.rb
chef-0.9.0.a91 lib/chef/resource/http_request.rb
chef-0.9.0.a90 lib/chef/resource/http_request.rb
chef-0.9.0.a10 lib/chef/resource/http_request.rb
chef-0.9.0.a8 lib/chef/resource/http_request.rb
chef-0.9.0.a6 lib/chef/resource/http_request.rb
chef-0.9.0.a4 lib/chef/resource/http_request.rb