With the only difference that there will be no difference in semantic of :get and :post, ... methods, and they both can have payloads?
def self.get(url, headers={}, &block)
Request.execute(:method => :get, :url => url, :headers => headers, &block)
end
def self.post(url, payload, headers={}, &block)
Request.execute(:method => :post, :url => url, :payload => payload, :headers => headers, &block)
end
def self.get(url, payload = nil, headers={}, &block)
Request.execute(:method => :get, :url => url, :payload => payload, :headers => headers, &block)
end
def self.post(url, payload = nil, headers={}, &block)
Request.execute(:method => :post, :url => url, :payload => payload, :headers => headers, &block)
end
I understood that it was made such way in according to ActiveResource routing scheme, but RESTful API not always correspond to such scheme.