Sha256: 1b7dd99d087cfb32fd51b76a00dfa22bbe1e63bfe9602611277c9efca051c5c9

Contents?: true

Size: 789 Bytes

Versions: 28

Compression:

Stored size: 789 Bytes

Contents

=begin rdoc
== HttpRequest
  
  Allows you to send an http request to a url
 
== Usage
  
  has_http_request "http://google.com/", :message => "{q : 'search term'}"
  
== Options
* <tt>url</tt> The url to send the request to (this can also be the name)
* <tt>message</tt> The payload to deliver with the http_request
  
=end
module PoolParty
  module Resources
    
    class HttpRequest < Resource
      
      default_options(
        :action   => :get,
        :message  => nil,
        :url      => nil
      )
      
      def print_to_chef
        <<-EOE
http_request "<%= name %>" do
  action :<%= action ? action : (exists ? :get : :delete) %>
  url <%= print_variable(url) %>
  message <%= print_variable(message || name) %>
end
        EOE
      end
      
    end
    
  end
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.1 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.10 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.11 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.12 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.13 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.14 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.15 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.16 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.17 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.2 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.3 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.4 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.5 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.6 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.7 lib/dependency_resolvers/chef/resources/http_request.rb
auser-poolparty-1.3.8 lib/dependency_resolvers/chef/resources/http_request.rb
fairchild-poolparty-1.3.17 lib/dependency_resolvers/chef/resources/http_request.rb
fairchild-poolparty-1.3.5 lib/dependency_resolvers/chef/resources/http_request.rb
poolparty-1.3.15 lib/dependency_resolvers/chef/resources/http_request.rb