From fa9f4520d5eb9f290d062095e7d445117057a531 Mon Sep 17 00:00:00 2001 From: rike e Date: Tue, 4 Feb 2020 09:30:04 +0100 Subject: [PATCH] include data in raw_delete request data was missing in raw_delete request: requests with json bodies like in "delete_client_roles_of_user" won't work --- keycloak/connection.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keycloak/connection.py b/keycloak/connection.py index 6f32439..65e8a0c 100644 --- a/keycloak/connection.py +++ b/keycloak/connection.py @@ -198,11 +198,12 @@ class ConnectionManager(object): raise KeycloakConnectionError( "Can't connect to server (%s)" % e) - def raw_delete(self, path, **kwargs): + def raw_delete(self, path, data, **kwargs): """ Submit delete request to the path. :arg path (str): Path for request. + data (dict): Payload for request. :return Response the request. :exception @@ -211,6 +212,7 @@ class ConnectionManager(object): try: return self._s.delete(urljoin(self.base_url, path), params=kwargs, + data=data, headers=self.headers, timeout=self.timeout, verify=self.verify)