Skip to content
Browse files

Include support for OAuth2 connections

send_request is based on Net::Http.  New version of OAuth2 library uses OAuth2Response based on Faraday.  Modified send_request to include support for OAuth2::Response AND Net::Http.
  • Loading branch information...
1 parent c1aee2b commit 0fe1413e79f08781d20694b9e880910a7dbcabe0 @KentonWhite committed Dec 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/garb/request/data.rb
View
2 lib/garb/request/data.rb
@@ -36,7 +36,7 @@ def send_request
oauth_user_request
end
- raise ClientError, response.body.inspect unless response.kind_of?(Net::HTTPSuccess)
+ raise ClientError, response.body.inspect unless response.kind_of?(Net::HTTPSuccess) || (response.respond_to?(:status) && response.status == 200)
response
end

0 comments on commit 0fe1413

Please sign in to comment.
Something went wrong with that request. Please try again.