diff --git a/oauth2/__init__.py b/oauth2/__init__.py index 835270e3..a92083e2 100644 --- a/oauth2/__init__.py +++ b/oauth2/__init__.py @@ -637,7 +637,7 @@ def set_signature_method(self, method): self.method = method def request(self, uri, method="GET", body='', headers=None, - redirections=httplib2.DEFAULT_MAX_REDIRECTS, connection_type=None): + redirections=httplib2.DEFAULT_MAX_REDIRECTS, connection_type=None, extra_parameters={}): DEFAULT_POST_CONTENT_TYPE = 'application/x-www-form-urlencoded' if not isinstance(headers, dict): @@ -653,7 +653,10 @@ def request(self, uri, method="GET", body='', headers=None, if is_form_encoded and body: parameters = parse_qs(body) else: - parameters = None + parameters = {} + + if extra_parameters and isinstance(extra_parameters, dict): + parameters.update(extra_parameters) req = Request.from_consumer_and_token(self.consumer, token=self.token, http_method=method, http_url=uri,