[openstack-dev] [api] Using query string or request body to pass parameter
soulxu at gmail.com
Tue Dec 9 06:28:33 UTC 2014
Kevin, thanks for the info! I agree with you. RFC is the authority. use
payload in the DELETE isn't good way.
2014-12-09 7:58 GMT+08:00 Kevin L. Mitchell <kevin.mitchell at rackspace.com>:
> On Tue, 2014-12-09 at 07:38 +0800, Alex Xu wrote:
> > Not sure all, nova is limited
> > at
> > That under our control.
> It is, but the client frameworks aren't, and some of them prohibit
> sending a body with a DELETE request. Further, RFC7231 has this to say
> about DELETE request bodies:
> A payload within a DELETE request message has no defined semantics;
> sending a payload body on a DELETE request might cause some
> implementations to reject the request.
> I think we have to conclude that, if we need a request body, we cannot
> use the DELETE method. We can modify the operation, such as setting a
> "force" flag, with a query parameter on the URI, but a request body
> should be considered out of bounds with respect to DELETE.
> > Maybe not just ask question for delete, also for other method.
> > 2014-12-09 1:11 GMT+08:00 Kevin L. Mitchell <
> kevin.mitchell at rackspace.com>:
> > On Mon, 2014-12-08 at 14:07 +0800, Eli Qiao wrote:
> > > I wonder if we can use body in delete, currently , there isn't
> > > case used in v2/v3 api.
> > No, many frameworks raise an error if you try to include a body
> with a
> > DELETE request.
> > --
> > Kevin L. Mitchell <kevin.mitchell at rackspace.com>
> > Rackspace
> Kevin L. Mitchell <kevin.mitchell at rackspace.com>
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev