Skip to content

Enhance request API. #2

bleuse opened this Issue Oct 15, 2012 · 3 comments

4 participants

bleuse commented Oct 15, 2012

In the request API, the HTTP method PUT is used either to manage the CouchDB request code and to delete results of the CouchDB request.
I would have used PUT for code management and POST for results handling.
Here is what I suggest :

'Request code' handling :
PUT /request/:req_name/
DELETE /request/:req_name/

'Request results' handling :
POST /request/:req_name/
POST /request/:req_name/destroy
@frankrousseau frankrousseau was assigned Jan 9, 2013
@frankrousseau member

I agree with the first part. But second part is still ambiguous. Why do you choose the POST verb for both of these routes ?

bleuse commented Feb 17, 2013

In the current API, POST is used to retrieve the request result. My opinion is that deleting documents matching a request is quite the same operation as retrieving the documents. Thus I would use the same HTTP method.

Hope I'm understandable.


What should we do about this issue?

I suggest we close it but in the same time we open a new one discussing API improvements that could (should?) be done in order to make the DS API more RESTful.

@aenario aenario closed this Jan 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.