Simple change that allows parameters to be passed in to Client.request() #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.