def execute_delete(self, path, parameters):
"""Execute DELETE request.
This method execute a DELETE request on the endpoint.
:param path: path of the request
:param parameters: parameters to include in the request
:return: json response
"""
try:
query_string = get_query_string(parameters)
req = self._get_req(path, method="DELETE",
query_string=query_string)
response = req.get_response(None)
except Exception as e:
response = webob.Response(status=500, body=str(e))
json_response = self._get_from_response(response)
return json_response
评论列表
文章目录