lib/mambanation/request.rb in mambanation-0.0.3 vs lib/mambanation/request.rb in mambanation-0.0.5

- old
+ new

@@ -1,19 +1,15 @@ module MambaNation class Request extend Forwardable def self.get(client, path, options={}) - a = new(client, :get, path, options) - # RAILS_DEFAULT_LOGGER.debug { "request: #{a.inspect}" } - a.perform + new(client, :get, path, options).perform end - def self.post(client, path, options={}) - a = new(client, :post, path, options) - # RAILS_DEFAULT_LOGGER.debug { "request: #{a.inspect}" } - a.perform + def self.post(client, path, options={}) + new(client, :post, path, options).perform end def self.put(client, path, options={}) new(client, :put, path, options).perform end @@ -41,9 +37,10 @@ uri.to_s end end def perform + puts "\nuri: #{uri}\noptions[:body]: #{options[:body]}\noptions[:headers]: #{options[:headers]}" MambaNation.make_friendly(send("perform_#{method}")) end private