garb icon indicating copy to clipboard operation
garb copied to clipboard

Support for OAuth2::Response

Open KentonWhite opened this issue 14 years ago • 1 comments

Google API now supports OAuth2. The OAuth2 gem uses Faraday wrapped by its own OAuth2::Response class. This class behaves differently than Net::HTTP that the OAuth gem depends on. The key difference is that OAuth2::Response exposes a method OAuth2::Response#status that returns the status code for the request.

Modified Garb::Request::Data##send_request to check for Net::HTTPSuccess or status = 200 on the response. If neither are present, raise ClientError and return the body of the response.

KentonWhite avatar Dec 20 '11 21:12 KentonWhite

Any chance this will be merged soon? Thanks!

adriandulic avatar Jan 06 '12 09:01 adriandulic