DELETE request with Payload #98

Open
wants to merge 1 commit into
from

Projects

None yet

9 participants

actaneon commented Nov 2, 2011

We are attempting to use RestClient to use the Chargify.com API. One of APIs has a DELETE request with a payload. We're not aware of anything in the spec that forbids a payload for a DELETE request so we have updated the gem to support this.

Owner

As it's rarely used I prefer to avoid breaking the API for it

@archiloque archiloque closed this Nov 19, 2011

unfortunately it isn't that rare.
you can use RestClient::Request directly or use monkey patching
RestClient::Request.execute(:method => method, :url => url, :payload => payload, :headers => {})

Elasticsearch also has a API using a DELETE request with payload:
http://www.elasticsearch.org/guide/reference/api/delete-by-query/

+1 to add this functionality.

@L2G L2G reopened this Apr 9, 2013
Owner
L2G commented Apr 9, 2013

I'm okay with doing this if it could be made backwards compatible. Then I think we could earmark it for 1.7.0.

thefosk commented Nov 1, 2013

+1, not implementing this is against the HTTP spec, as the spec doesn't forbid a body in a DELETE request.

Owner
ab commented Mar 28, 2014

You're right that the delete method should probably accept a payload, but I don't think we can break API compatibility in a minor release. In the meantime you can use RestClient::Request.execute instead of one of the helpers.

See also #266

@ab ab added this to the 2.0.0 milestone Mar 28, 2014
@ab ab referenced this pull request Mar 28, 2014
Open

Payload Support For DELETE #266

@ab ab modified the milestone: 3.0, 2.0.0 Apr 15, 2015

+1 for this if we can

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment