Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OAuth2::Response #109

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

KentonWhite
Copy link

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.

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.
@adriandulic
Copy link

Any chance this will be merged soon? Thanks!

Quick hack to upgrade management API to GData v 2.4.  Main change is the response is XML only
@KentonWhite KentonWhite reopened this Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants