Skip to content

Commit 2a123b6

Browse files
authored
forward all requests params to request method
1 parent 3ad62f4 commit 2a123b6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

redminelib/engines/base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ def create_session(**params):
5050
"""
5151
raise NotImplementedError
5252

53-
@staticmethod
54-
def construct_request_kwargs(method, headers, params, data):
53+
def construct_request_kwargs(self, method, headers, params, data):
5554
"""
5655
Constructs kwargs that will be used in all requests to Redmine.
5756
@@ -61,12 +60,12 @@ def construct_request_kwargs(method, headers, params, data):
6160
:param data: (required). Data to send in the body of the request.
6261
:type data: dict, bytes or file-like object
6362
"""
64-
kwargs = {'data': data or {}, 'params': params or {}, 'headers': headers or {}}
63+
64+
kwargs = dict(self.requests, **{'data': data or {}, 'params': params or {}, 'headers': headers or {}})
6565

6666
if method in ('post', 'put', 'patch') and 'Content-Type' not in kwargs['headers']:
6767
kwargs['data'] = json.dumps(data)
6868
kwargs['headers']['Content-Type'] = 'application/json'
69-
7069
return kwargs
7170

7271
def request(self, method, url, headers=None, params=None, data=None):

0 commit comments

Comments
 (0)