lib/goauth2/client.rb in goauth2-0.0.6 vs lib/goauth2/client.rb in goauth2-0.0.7

- old
+ new

@@ -72,20 +72,20 @@ end return @access_token end def _get_jsonc(url, params={}) - ps = {'alt' => 'jsonc'}.merge!(params) - res = _get(url, :params => ps) + params.merge!({'alt' => 'jsonc'}) + res = _get(url, params) end def _get_json(url, params={}) - ps = {'alt' => 'json'}.merge!(params) + params.merge!({'alt' => 'jsonc'}) res = _get(url, params) end def _get(url, params={}) - res = access_token.get(url, params) + res = access_token.get(url, :params => params) Goauth2::HashResponse.new(JSON.parse(res.body)) rescue res end def _post(url, params={}, headers={}) oauth_response = access_token.post(url, params, headers)