I am learning how to build a website with node.js +express. When I click on a button (in the browser), it prints "hello" in the node.js console. It worked (this is not the problem). To do that, I created a app.get route.
But I wonder which http request methods (https://www.rfc-editor.org/rfc/rfc7231#section-4), I should use to conform to the REST architectural style.
- GET must be used to read
- POST must be used to create
- PUT must be used to update and to create
- DELETE must be used to delete
- ...
I do not read, create, update, delete, ... anything. I just run a command on the server (Of course, print hello is not the final goal. I plan to run more complex commands).
Thanks for answer.