Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

POST or GET for triggering an update

I have a Spring-Boot application and want to trigger an update method via an endpoint in my Controller class. I can´t decide wheather to use a PUT or POST. On the one hand updating my application via this endpoint sounds for me like a POST but in the other hand it will be a simple call without sending any data, which sounds for me like a GET.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

GET methods should be be idempotent and (usually) have no side effects. That makes an empty POST a better option.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading