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

Are you guys following Restful Api conventions? if yes then why action like update, delete are part of Urls? #246

Closed
akashabbasi opened this issue Aug 21, 2022 · 4 comments

Comments

@akashabbasi
Copy link

No description provided.

@github-actions
Copy link

Thank you for opening your first issue here! Please be patient until your request is processed 🚀

@andrechristikan
Copy link
Owner

No, I do not follow that.

This is my personal opinion. 
In microservice architecture, they have a component named Restful API.

Simply, Restful API use as bridge between backend and frontend.
So, whatever you do in the frontend, like create/update/delete/ or even read (CRUD), that must pass via the Restful API. 
Your frontend does have the capability of doing CRUD directly.

This answer will differ from your case, especially if you use monolithic architecture.

Hopefully, this will help you.

@akashabbasi
Copy link
Author

So if i use this boilerplate for a monolith app. Should i rename routes to restful naming conventions like
PUT /users/update/:user -> PUT /users/:id?

@andrechristikan
Copy link
Owner

I think that is just the same. You can choose whatever you like. 
That is just the style among developers.

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

No branches or pull requests

2 participants