lib/weeter/plugins/lib/oauth_http.rb in weeter-0.15.0 vs lib/weeter/plugins/lib/oauth_http.rb in weeter-0.17.0

- old
+ new

@@ -6,23 +6,23 @@ module Net class OauthHttp def self.get(config, url, params = {}) request(config, :get, url, params) end - + def self.put(config, url, params = {}) request(config, :put, url, params) end def self.post(config, url, params = {}) request(config, :post, url, params) end - + def self.delete(config, url, params = {}) request(config, :delete, url, params) end - + def self.request(config, method, url, params = {}) if method == :post request_options = {:body => params} else request_options = {:query => params} @@ -30,11 +30,11 @@ request_options.merge!(:head => {"Authorization" => oauth_header(config, url, params, method.to_s.upcase)}) if config.oauth EM::HttpRequest.new(url).send(method, request_options) end def self.oauth_header(config, uri, params, http_method) - ::SimpleOauth::Header.new(http_method, uri, params, config.oauth).to_s + ::SimpleOAuth::Header.new(http_method, uri, params, config.oauth).to_s end end end end -end \ No newline at end of file +end