Skip to content

Commit

Permalink
Removed Typhoeus requests and started using ruby http library
Browse files Browse the repository at this point in the history
  • Loading branch information
timols committed Aug 9, 2011
1 parent d16e5a8 commit 3b8f5e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/foursquare/base.rb
Expand Up @@ -34,7 +34,7 @@ def get(path, params={})
Foursquare.log("GET #{API + path}")
Foursquare.log("PARAMS: #{params.inspect}")
merge_auth_params(params)
response = JSON.parse(Typhoeus::Request.get(API + path, :params => params).body)
response = JSON.parse(https_get("#{API}#{path}?#{params.to_query}").body)
Foursquare.log(response.inspect)
error(response) || response["response"]
end
Expand Down Expand Up @@ -67,7 +67,7 @@ def post(path, params={})
Foursquare.log("POST #{API + path}")
Foursquare.log("PARAMS: #{params.inspect}")
merge_auth_params(params)
response = JSON.parse(Typhoeus::Request.post(API + path, :params => params).body)
response = JSON.parse(https_post(API + path, params).body)
Foursquare.log(response.inspect)
error(response) || response["response"]
end
Expand Down Expand Up @@ -111,7 +111,7 @@ def access_token(code, redirect_uri)

# response
# http://developer.foursquare.com/docs/oauth.html
response = JSON.parse(Typhoeus::Request.get(url).body)
response = JSON.parse(https_get(url).body)
response["access_token"]
end

Expand Down

0 comments on commit 3b8f5e3

Please sign in to comment.