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

请问egg router的resources方法,为何不支持PATCH来支持标准的restful更新部分字段 #1793

Closed
jerrydotlam opened this issue Dec 7, 2017 · 5 comments

Comments

@jerrydotlam
Copy link

请问egg router的resources方法,为何不支持PATCH来支持标准的restful更新部分字段

@atian25
Copy link
Member

atian25 commented Dec 11, 2017

应该是没场景吧,欢迎 PR。

cc @dead-horse @jtyjty99999

@atian25 atian25 closed this as completed Dec 14, 2017
@popomore
Copy link
Member

这个确实是之前的设计问题,patch 是有场景的,只是用 put 误用了。

@dead-horse
Copy link
Member

新增一个 PATCH -> patch 方法的映射吧,这样如果要完整遵循 http Method 语义的话,部分更新就实现 patch,全量更新就实现 update。

@mosaic101
Copy link
Contributor

@dead-horse @atian25 @popomore 是否需要更改为 patch/put 都指向 update ? #1938

@dead-horse
Copy link
Member

改成 update 也可以,文档里面都用 PATCH 替换掉 PUT,从文档层面 deprecate 掉 PUT 方法吧。

popomore pushed a commit that referenced this issue Jan 19, 2018
docs: put => patch. (#1793) (#1938)
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

6 participants