Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the current behavior POST /{db}/_design/{ddoc}/_update/{func}/{docid} #4631

Open
ecerulm opened this issue Jun 1, 2023 · 0 comments

Comments

@ecerulm
Copy link
Contributor

ecerulm commented Jun 1, 2023

Summary

The current documentation for 1.5.14. /{db}/_design/{ddoc}/_update/{func}/{docid} only mentions PUT method although POST also works

curl -v -n --json 'love'  http:https://couchdb.localhost:5984/hello-world/_design/recipe/_update/ingredients/SpaghettiWithMeatballs       
...
> POST /hello-world/_design/recipe/_update/ingredients/SpaghettiWithMeatballs HTTP/1.1
> Host: couchdb.localhost:5984
...
< HTTP/1.1 201 Created
...
< 
{"status":"ok"}

PUT is probably the preferred way, but I guess that POST should be also documented and probably deprecated too as @nickva mentioned in #4628 (comment).

Desired Behaviour

Document POST /{db}/_design/{ddoc}/_update/{func}/{docid} with a deprecation note for next version.

Possible Solution

Additional context

This is just confusing for people like me that are new to CouchDB and like to go to the documentation as primary source.

If you see a code example somewhere in the internet using POST Document POST /{db}/_design/{ddoc}/_update/{func}/{docid}` and you go to the documentation to try to understand what is the purpose of that API call, you wouldn't find it. You would need to guess that probably POST and PUT do the same thing in this case.

Related

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

No branches or pull requests

2 participants