rcextensions: helpers fix, non json data should use params.
This commit is contained in:
parent
631a663b62
commit
56e0778e90
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ def run(url, json_data=None, params=None, method='post'):
|
|||
if json_data:
|
||||
resp = method_caller(url, json=json_data, timeout=timeout)
|
||||
elif params:
|
||||
resp = method_caller(url, params=json_data, timeout=timeout)
|
||||
resp = method_caller(url, params=params, timeout=timeout)
|
||||
else:
|
||||
raise AttributeError('Provide json_data= or params= in function call')
|
||||
resp.raise_for_status() # raise exception on a failed request
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue