Dan Kenigsberg has submitted this change and it was merged.
Change subject: rest-api: Allow optional data in DELETE request bodies
......................................................................
rest-api: Allow optional data in DELETE request bodies
By default, cherrypy does not allow data in DELETE HTTP requests. In our
API, we would like to pass parameters to some DELETE requests. We
accomplish this by configuring two things:
1) Set request.methods_with_bodies to include DELETE. This tells cherrypy
that we should process the body of DELETE requests too.
2) Create a hook to enable body processing only for DELETE requests with an
appropriate decorator. This makes a request body optional for the
indicated functions.
Signed-off-by: Adam Litke <agl(a)us.ibm.com>
Change-Id: I65466894358029c7fe5f0ef46a32492682975761
---
M vdsm/rest/BindingREST.py
M vdsm/rest/Controller.py
2 files changed, 22 insertions(+), 1 deletion(-)
Approvals:
Adam Litke: Verified
Dan Kenigsberg: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/5049
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I65466894358029c7fe5f0ef46a32492682975761
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>