Sha256: ea08de7fa6e2e47bff0f7213331a17ee47e4b659beeef0b095b8834ba5274ebd

Contents?: true

Size: 794 Bytes

Versions: 26

Compression:

Stored size: 794 Bytes

Contents

module Resourceful
  module Simple
    def request(method, uri, header = {}, data = nil)
      default_accessor.resource(uri).request(method, data, header)
    end
    
    def default_accessor
      @default_accessor ||= Resourceful::HttpAccessor.new
    end
    
    def add_authenticator(an_authenticator)
      default_accessor.add_authenticator(an_authenticator)
    end

    def get(uri, header = {})
      request(:get, uri, header)
    end

    def head(uri, header = {})
      request(:head, uri, header)
    end

    def delete(uri, header = {})
      request(:delete, uri, header)
    end
 
    def post(uri, data = nil, header = {})
      request(:post, uri, header, data)
    end

    def put(uri, data = nil, header = {})
      request(:put, uri, header, data)
    end
  end

end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
abiquo-etk-0.6.4 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.6.3 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.6.2 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.6.1 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.6.0 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.5.9 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.5.8 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.5.3 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.42 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.33 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.32 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.29 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.25 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.24 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.23 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.22 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.20 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.19 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.18 vendor/resourceful-1.0.1/lib/resourceful/simple.rb
abiquo-etk-0.4.17 vendor/resourceful-1.0.1/lib/resourceful/simple.rb