def performGenericDelete(connection, listUrl, payloadDict): ''' This will perform a generic DELETE method on a given url Args: - connection is the connection object that manages the HTTP data transfers between the client and the REST API - url is the address of where the operation will be performed - payloadDict is the python dict with the parameters for the operation ''' data = json.dumps(payloadDict) reply = connection.httpDelete(url=listUrl, data=data) if not reply.ok: raise Exception(reply.text) return reply