-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
Feature request: Generic service method #714
Comments
The FAQ entry can be found here: https://docs.feathersjs.com/faq/readme.html#how-do-i-create-custom-methods and the linked issue comment (#488 (comment)) has more details on this. I never needed it but if there really is a need for custom actions, implementing a custom service with a |
Thank you for links to earlier discussions, they have some very good points! One point I think is not mentioned before is ease of understanding, for beginners. For example the authentication
I assume you have needed authentication, e.g.
Post was just a suggestion, and I mean post in the sense "publish something". Though the connection to HTTP POST might be confusing. As I understand you and the earlier discussions, this is definitely outside bounds, as a feathers is strictly a REST architecture. So I'm closing. Thanks for answering! |
I've created a plugin, which lets you add custom methods to services: https://www.npmjs.com/package/feathers-custom-methods |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs. |
To add custom methods today one would probably do
For example, see authentication-management, where they use this pattern:
Earlier, custom methods has been rejected #86, according to @daffl "for several good reasons". In the stack exchange answer, the link for the detailed explanation is broken, so I might have missed some good points.
Anyway, if not custom methods, I believe there is room for a generic method. Like
service.post
, that works over both REST and socket.The text was updated successfully, but these errors were encountered: