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

Simple change that allows parameters to be passed in to Client.request() #59

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

Conversation

jskitz
Copy link

@jskitz jskitz commented Mar 8, 2011

Essentially, the problem I was experiencing is that django-piston 0.3 forces the oauth_callback parameter to be sent on requesting a token, as is specified in the OAuth 1.0a specification. However, in the sample Client code, there seemed to be no way to get this to work with the current python-oauth2 code. If I passed oauth_callback parameters in via the body, django-piston would fail (could be a bug from django-piston). So essentially, this change just adds a keyword argument parameters={}, which defaults to an empty dictionary, and is updated with parameters from the body if present. This change, I believe is 2 lines of code total, and makes the client code much more extensible in terms of adding non-OAuth parameters as well in the workflow.

… that the oauth_callback parameter can easily be added to the initial token request as required by OAuth 1.0a. This also let django-piston 0.3 work correctly with python-oauth2 sample clients.
…ctionary. Before, any object could be passed in and could bork the update() if is_form_encoded and body exists.
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.

1 participant