Skip to content
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
make GlpiService.request use json parameter
so it would be possible to make "low-level" requests. for instance, [assign users to ticket](https://forum.glpi-project.org/viewtopic.php?pid=340693#p340693) is impossible, if you use `data` parameter instead of `json`, because `PreparedRequest.prepare_body` messes up arrays.
  • Loading branch information
szelga authored Nov 29, 2019
commit b3381f0ef7fe2ebd569fa3670a2d583322b3a067
2 changes: 1 addition & 1 deletion glpi/glpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def request(self, method, url, accept_json=False, headers={},
try:
response = requests.request(method=method, url=full_url,
headers=headers, params=params,
data=data, **kwargs)
data=data, json=json,**kwargs)
except Exception:
logger.error("ERROR requesting uri(%s) payload(%s)" % (url, data))
raise
Expand Down