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

fix request() for method and url to be keyword args, not just positional #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/salesforce_requests_oauthlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def query(self, query_string, api_version='XX.X',

return to_return

def request(self, *args, **kwargs):
def request(self, method, url, *args, **kwargs):
if not self.auth_flow_in_progress:
if self.access_token is None:
raise WebServerFlowNeeded(
Expand All @@ -541,9 +541,6 @@ def request(self, *args, **kwargs):
if 'version_substitution' in kwargs:
version_substitution = kwargs['version_substitution']

# Not checking the first two args for sanity - seems like overkill.
url = args[1]

if version_substitution:
if 'vXX.X' in url:
if not hasattr(self, 'version') or self.version is None:
Expand All @@ -568,9 +565,9 @@ def request(self, *args, **kwargs):
)

return super(SalesforceOAuth2Session, self).request(
args[0],
method,
url,
*args[2:],
*args,
**kwargs
)

Expand Down